We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to move the CurrentCell to the first column of the AddNewRow when the Tab key is pressed from the last column and its position is at the Bottom of the SfDataGrid?

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.

C#

 

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.

C#

 

 

Note: You need to override the GridCellSelectionController class when the SelectionUnit is the GridSelectionUnit.Cell.

 

Sample Links:

 

WPF

 

WRT

 

UWP

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
6045 01/21/2016 01/21/2016 UWP SfDataGrid 4.5
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.