I want to add a new row to my datagrid when I press the "TAB" key in the last datagrid cell.
I am using the MVVM pattern for this. I came up with a solution, I comprehended the Tab key on datagrid input binding:
<DataGrid.InputBindings>
<KeyBinding Command="{Binding Path=InsertNewLineCommand}" Key="Tab"></KeyBinding>
</DataGrid.InputBindings>
And added the following code to InsertNewLineCommand:
private void ExecuteInsertNewLineCommand()
{
{
InsertNewLine();
}
}
But the problem is that ON ADDING KEYBINDING = 'TAB' MY NORMAL FEATURE OF THE TABLE ON A NETWORK DISCONNECTION (MOVING TO THE NEXT CELL AND SO ...)
source
share