How to freeze expanded Rowdetails

Oct 7, 2009 at 9:50 PM
I have a number of hierarchical DataGrids (sub-DataGrids contained with
the DataGrid.RowDetailsTemplate tag) and when I refresh the DataGrid by
calling JobListGrid.ItemsSource = AppData.OrderDataList, some of (but no
all of the sub-grid expanded RowDetails become collapsed.

How can this be prevented?


Nov 27, 2009 at 10:34 AM
Edited Nov 27, 2009 at 10:37 AM

I have a similar problem.

In my DataGrid I set the RowDetailsVisibilityMode to Collapsed. I explicitly show Details of some Rows with a ToggleButton in a grid column. When I sort the grid with a click on a column header the collection view is changed an all my RowDetails collapse.

If I use the VisibleWhenSelected mode the RowDetails are refreshed.

I think I can try to rebuild the expanded row with LoadingRow and UnloadingRow.

My questions:

Is there an easier solution for this task?

If not, do you have a sample for doing what I want with the events or a reference where I can read more to understand what I have to do?