I have DataBoundGrid control on the form.
There are some records with related records.
I can select some records both from parent and related.
But when I go to some parent record and expand it, selection jump to currently expanding record.
I want the selection not missing.
Is it possible ?
ADAdministrator Syncfusion Team July 6, 2004 06:59 AM
I do not see this problem in this sample.
I can select parent rows and child rows, and then expand another node without the selections changing.
What are you doing differently?
ADAdministrator Syncfusion Team July 6, 2004 07:42 PM
The difference is in ListBoxSelectionMode property.
I need the behavior like MultiSelected mode.
in this mode, selections dissapeared when I press collapse button :(
ADAdministrator Syncfusion Team July 6, 2004 07:50 PM
By the way, does selection work same way in virtual mode of grid ?
ADAdministrator Syncfusion Team July 7, 2004 12:53 AM
If you want your selections of child rows to persist across collapsing and expanding parent rows, then you will have to do this yourself. You can handle the RowsCollapsing event, and there, save the selected child rows in some way (Maybe a hashtable where teh key is the primary id value of the parent row and the value is a array of positions in the child table of the selected rows.) Then can handle the RowsExpanded event and check the hashtable for the parent primary id, and reselect the positions stored in the hashtable. It would take a little code to do, but I think it is doable.
The slections behave essentailly the same in a GridControl as in a GridDataBoundGrid. A virtual grid is a GridControl.