I have a collection of custom object bound to a grid through a DataSource.
The type of the objects is BusinessBase.
I added an unbound column (Key : SEL) with a bool value.
I want to be able to retrieve each BusinessBase object corresponding to the rows where SEL = true.
Anyone can provide a sample on how to accomplish this ?
Thanks.
Thanks.!
You would just have to loop through all the rows in the grid and check this condition, then look at the ListObject of the row, i.e.:
foreach (UltraGridRow row in this.ultraGrid1.Rows){ if ((bool)row.Cells["SEL"].Value) { BusinessBase businessObject = (BusinessBase)row.ListObject; // Do stuff }}
-Matt