Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Row Expansion State
posted

I have a very complex hierarchical grid with a layout like this.

Truck

           Employees

                       Notes

           Orders

                        Items

                        Notes

            Pay Information

           Notes

 

When the user clicks to save the data I update and refresh the dataset. The issue is that the grid's rows lose their expansion state. For example if, the second truck on the list is expanded and has its top order expanded, and the fifth truck is expanded and has its third order expanded then clicks save the rows that were expanded are no longer expanded because the datasource has been refreshed. This is very annoying for my users. I know I can do an expand all but that is just as annoying. So my only solution I can think of is having a datatable inside my code that stores the expansion state with a unique value and band index for each row. But I'm also having trouble even if I have that of building a recursive query to cycle through each row in each band of the grid to check against this temporary datatable. Based off of my situation, does anyone have any suggestions and/or examples that I can use to help me come up with an effective solution.....thanks Adam

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Adam,

    If the grid is losing state information, then it's an indication that the DataSource is sending a reset notifcation to the grid, or that you are re-setting the grid's DataSource to a new data source.

    So this is probably an issue with your data source and how you are going about the update process. Typically, for something like this, you would use a DataAdapter and call the Update method to write the changes back to the back end. My guess is that you are either not using the DataAdapter or that you are adding in some extra steps that are causing the data source to be reset.

Children
No Data