Skip to content

Commit 4758efc

Browse files
authored
Merge pull request #4 from SyncfusionExamples/ES-976509
ES-976509 - Resolved the ReadMe file issue in the sample repository
2 parents eeebebc + 9c99277 commit 4758efc

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed
214 KB
Loading

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
1-
# How to maintain the DetailsView expanded state when Sorting and Grouping the DataGrid SfDataGrid
1+
# How to Maintain the DetailsView Expanded State when Sorting and Grouping the WPF DataGrid?
22

3-
This sample show cases how to maintain the DetailsView expanded state when Sorting and Grouping the [WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid)?
3+
This sample show cases how to maintain the DetailsView expanded state when Sorting and Grouping the [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid) (SfDataGrid).
44

5-
When you are processing the data operation (Grouping, Sorting) the expanded DetailsViewDataGrid is collapsed in [WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid).
5+
When you are processing the data operation ([Grouping](https://help.syncfusion.com/wpf/datagrid/grouping), [Sorting](https://help.syncfusion.com/wpf/datagrid/sorting)) the expanded DetailsViewDataGrid is collapsed in DataGrid.
66

77
### Grouping
88

9-
You can expand all the `DetailsViewDataGrid` when processing the grouping in `SfDataGrid.GroupColumnDescriptions.CollectionChanged` event.
9+
You can expand all the `DetailsViewDataGrid` when processing the grouping in `SfDataGrid.GroupColumnDescriptions.CollectionChanged` event.
1010

11-
```C#
11+
``` Csharp
1212
this.dataGrid.GroupColumnDescriptions.CollectionChanged += GroupColumnDescriptions_CollectionChanged;
1313

1414
private void GroupColumnDescriptions_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
1515
{
1616
dataGrid.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle,
17-
new Action(() =>
18-
{
19-
this.dataGrid.ExpandAllDetailsView();
20-
}));
17+
new Action(() =>
18+
{
19+
this.dataGrid.ExpandAllDetailsView();
20+
}));
2121
}
2222
```
23+
2324
### Sorting
2425

2526
You can expand all the `DetailsViewDataGrid` when processing sorting in `SfDataGrid.SortColumnsChanged` event.
27+
2628
``` C#
2729
this.dataGrid.SortColumnsChanged += DataGrid_SortColumnsChanged;
2830

2931
private void DataGrid_SortColumnsChanged(object sender, GridSortColumnsChangedEventArgs e)
3032
{
3133
dataGrid.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle,
32-
new Action(() =>
33-
{
34-
this.dataGrid.ExpandAllDetailsView();
35-
}));
34+
new Action(() =>
35+
{
36+
this.dataGrid.ExpandAllDetailsView();
37+
}));
3638
}
3739
```
40+
41+
![DetailsViewDataGrid are in expanded state after grouping](DetailsViewDataGridExpandedStateAfterGrouping.gif)

0 commit comments

Comments
 (0)