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

Persisting Expanded Groups after a refresh

Hi, I have a grouping grid with a number of levels of grouping. I''d like a way to remember which group items were orignally expanded prior to refreshing the grid completely and then searching for each of those expanded groups and auto expanding them for the user. I add each grouping column to syncGrid.TableDescriptor.GroupedColumns but can''t find a way to enumerate through the gird in order to check group.IsExpanded - should I be looking at syncGrid.Table.TopLevelGroup.Groups? Thanks Jason

1 Reply

AD Administrator Syncfusion Team July 6, 2004 11:46 AM

Jason, you can loop through the groups by iterating through groupingGrid.Table.TopLevelGroup.Groups. For each group that has IsExpanded = true you can get the Category and store it in an array. Once you have reloaded the grid, you can then loop through that array of category keys and for each key do a find using groupingGrid.Table.TopLevelGroup.Groups.FindGroup(categoryKey). FindGroup returns an index that can be passed into groupingGrid.Table.TopLevelGroup.Groups[index]. With that group you could then set IsExpanded = true. Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon