Posted 5 May 2020, 11:05 pm EST
Hello,
I have a dataset that has over 500,000 records. I only load 100 at a time in the grid. When I choose a column to group on, I make a call to the database that will give me purposely only 1 record for each group.
When I click the “+” to expand the group header row, I call an event named GrpRow_GroupRowsVisibilityChanged where I then capture information about the header row and pass that information to the database to retrieve records that match that grouping.
After I retrieve the records from the database, I assign them to a ListControlView and then assign the ListControlView to the ItemsSource property of the grid. This ends up displaying a grid with no grouping and only having the rows that I just retrieved from the database.
Is there a way to append additional rows to the grid without it wiping out all the other rows and the grouped rows as well? Do I have to first capture the state of the grid, meaning all the grouping info, the sorting and filtering info and all the data and then append the new records to the grid and reapply the grouping, sorting and filtering info again programmatically? Seems there should be an easier way to append rows without having to recreate the whole state of the grid every time.
Please clarify and provide any code samples if possible.
Thank you very much.
Dave