Hi Rahul,
Thanks for contacting Syncfusion support.
We have checked your query and you can achieve your requirement by using SfDataGrid.PreviewKeyDown event. In sample, the Name column only editable and while pressing the Enter key the focus move to next cell (next row)of editable column.
Please refer the below code example
this.grid.PreviewKeyDown += Grid_PreviewKeyDown;
private void Grid_PreviewKeyDown(object sender, KeyEventArgs e)
{
//Get the row index of current cell
var rowindex = grid.Model.CurrencyManager.CurrentCell.RowIndex;
if (rowindex < (grid.Model.RowCount - 1))
{
//Get the column index of current cell
var colindex = grid.Model.CurrencyManager.CurrentCell.ColumnIndex;
if (e.Key == Key.Enter)
{
//Need to move the selection into next row of current column
grid.Model.CurrencyManager.CurrentCell.MoveTo(rowindex + 1, colindex);
e.Handled = true;
}
}
} |
Please download the sample from the below location.
Regards,
Srinivasan