You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-18Lines changed: 15 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,11 @@
1
-
# How to programmatically scroll and select the records of the multi-level DetailsView on initial loading in UWP DataGrid (SfDataGrid)?
1
+
# How to Programmatically Scroll and Select the Records of the Multi-level DetailsView on Initial Loading in UWP DataGrid?
2
2
3
-
## About the sample
3
+
This sample illustrates how to programmatically scroll and select the records of the multi-level DetailsView on initial loading in [UWP DataGrid](https://www.syncfusion.com/uwp-ui-controls/datagrid) (SfDataGrid).
4
4
5
-
This sample illustrates how to programmatically scroll and select the records of the multi-level DetailsView on initial loading in UWP DataGrid.
5
+
You can select the records of the Master-DetailsView programmatically on initial loading by setting the corresponding child grid row index to the [SfDataGrid.SelectedIndex](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.Grid.SfGridBase.html#Syncfusion_UI_Xaml_Grid_SfGridBase_SelectedIndex) property. This can be achieved by passing the row index of both the parent and child grids. Before setting the SelectedIndex to childgrid, you need to check whether the corresponding parent record is in the expanded or collapsed state. When it is expanded, you can directly select the records of the child grid; otherwise, you need to expand it manually by using the [SfDataGrid.ExpandDetailsViewAt](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.Grid.SfDataGrid.html#Syncfusion_UI_Xaml_Grid_SfDataGrid_ExpandDetailsViewAt_System_Int32_) helper method. You can also bring the corresponding DetailsView grid into the view by using the [DetailsViewManager.BringToView](https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.Grid.DetailsViewManager.html#Syncfusion_UI_Xaml_Grid_DetailsViewManager_BringIntoView_System_Int32_) helper method. This is demonstrated in the following code example.
6
6
7
-
You can select the records of the Master-DetailsView programmatically on initial loading by setting the corresponding child grid row index to the SfDataGrid.SelectedIndex property. This can be achieved by passing the row index of both the parent and child grids. Before setting the SelectedIndex to childgrid, you need to check whether the corresponding parent record is in the expanded or collapsed state. When it is expanded, you can directly select the records of the child grid; otherwise, you need to expand it manually by using the SfDataGrid.ExpandDetailsViewAt helper method. You can also bring the corresponding DetailsView grid into the view by using the DetailsViewManager.BringToView helper method. This is demonstrated in the following code example.
8
-
9
-
10
-
```Xaml
7
+
#### XAML
8
+
```xml
11
9
<syncfusion:SfDataGridx:Name="dataGrid"
12
10
ColumnSizer="Auto"
13
11
AutoGenerateColumns="True"
@@ -17,6 +15,7 @@ You can select the records of the Master-DetailsView programmatically on initial
0 commit comments