Home Forums WinForms controls Xceed Grid for WinForms AddingDataRow event with combination of un-/bound grid Reply To: AddingDataRow event with combination of un-/bound grid

User (Old forums)
Member
Post count: 23064

Thanks a load AndreC,

After doing some casting I’ve been able to retrieve all datarows I need! You have been very helpfull. I’ll post the information here to make this thread complete.

[code]

// cast the SourceObject to an DataRowView
DataRowView curSerialRowView = (DataRowView)e.DataRow.SourceObject;

//retrieve the SerialRow from the DataRowView
SerialViewDataSet.SerialRow currentSerialRow = curSerialRowView.Row as SerialViewDataSet.SerialRow;

//retrieve child relation rows (casted from DataRow[])
SerialViewDataSet.GuaranteeRow[] currentGuaranteeRow = (SerialViewDataSet.GuaranteeRow[])currentSerialRow.GetChildRows(“FK_Serial_Guarantee”);

//now you have a system.array with the datarows

[/code]

I hope this helps others with the same kind of problem.

Imported from legacy forums. Posted by opicron (had 3596 views)