We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Losing selections in hierarchical grid

We''re using a simple 2-level hierarchical grid, 2 datasets, with a relation, pretty standard stuff. The grid works fine, expanding and collapsing as expected. The issue is this: if you select a child item, and then collapse the parent (so that the child is no longer visible), when you expand the node again the child is no longer selected (and it doesn''t appear in the Selections collection either). We need the child to stay selected, regardless of collapsed/expanded state. What''s the easiest method for doing this?

1 Reply

AD Administrator Syncfusion Team March 14, 2006 11:24 AM UTC

Hi Jeugenides, Only the record based selection supports selecting records across the nested tables. Set the TableOption.AllowSelection = GridSelectionFlags.None otherwise the old GridModel based selection code will be used. Then the selected records can be retrieved form the Table.SelectedRecords collection, regardless of the record being collapsed or expanded. Please refer the attached sample. Regards, Calvin.

41847.zip

Loader.
Live Chat Icon For mobile
Up arrow icon