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
# How to move selection to record when add the new row in SfDataGrid contains empty record in WPF DataGrid (SfDataGrid)?
1
+
# How to Move Selection to Record when Add the New Row Contains Empty Record in WPF DataGrid?
2
2
3
-
## About the sample
3
+
This sample illustrates that how to move selection to record when add the new row contains empty record in [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid) (SfDataGrid).
4
4
5
-
This sample illustrates that how to move selection to record when add the new row in SfDataGrid contains empty record in [WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid).
6
-
7
-
The current cell will remain in the AddNewRow after adding a record when the grid has no records in [WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid). But, you can move the current cell to the newly added record by moving the current cell in [SfDataGrid.RowValidated](https://help.syncfusion.com/cr/cref_files/wpf/Syncfusion.SfGrid.WPF~Syncfusion.UI.Xaml.Grid.SfDataGrid~RowValidated_EV.html) event using the ScrollInView() method. You can also change the AddNewRow state to the normal using [VisualStateManager.GoToState()](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.visualstatemanager.gotostate?view=winrt-19041) method.
5
+
The current cell will remain in the AddNewRow after adding a record when the grid has no records in `DataGrid`. But, you can move the current cell to the newly added record by moving the current cell in [SfDataGrid.RowValidated](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.SfDataGrid.html#Syncfusion_UI_Xaml_Grid_SfDataGrid_RowValidated) event using the ScrollInView() method. You can also change the AddNewRow state to the normal using [VisualStateManager.GoToState()](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.visualstatemanager.gotostate?view=winrt-19041) method.
KB article - [How to move selection to record when add the new row in SfDataGrid contains empty record in WPF DataGrid (SfDataGrid)?](https://www.syncfusion.com/kb/11768/how-to-move-selection-to-record-when-add-the-new-row-in-sfdatagrid-contains-empty-record-in)
38
-
39
-
## Requirements to run the demo
40
-
Visual Studio 2015 and above versions
41
-
42
-
30
+

0 commit comments