I want to have a Custom DataGrid which can,
Move to next cell when Enter key is pressed also if it is in edit mode.
When the last column in the current row is reach, the focus should move to the first cell of next row.
On reaching to next cell, if the cell is editable, it should automatically became editable.
If the cell contains an ComboBox not comboboxcolumn, the combobox should DropDownOpen.
Please help me in this. I have been trying from the past few day by creating a Custom DataGrid and wrote some code in
protected override void OnPreviewKeyDown(System.Windows.Input.KeyEventArgs e)
But I failed.
解决方案private void dg_PreviewKeyDown(object sender, KeyEventArgs e)
{
try
{
if (e.Key == Key.Enter)
{
e.Handled = true;
var cell = GetCell