In the SfDataGrid, when the Tab Key is pressed from the last column of the AddNewRow, the values are committed and the CurrentCell remains in the last column of the AddNewRow. To change this behavior and move the CurrentCell to the first column of the AddNewRow, change the Tab key’s behavior by overriding the GridSelectionController class and setting it to the SfDataGrid.SelectionController property.
The following code example shows how to set the instance of overriding the GridSelectionController class to the SfDataGird.SelectionController property.
The following code example explains how to override the GridCellSelectionController class. Here, you need to override the ProcessKeyDown method. Within this method, you can move the CurrentCell to the first column of the AddNewRow by using the GridSelectionController.MoveCurrentCell method.
Note: You need to override the GridCellSelectionController class when the SelectionUnit is the GridSelectionUnit.Cell.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:||.NET Framework:|