I am working on a uwp app. In that I am using a data grid from https://github.com/MyToolkit/MyToolkit/wiki/DataGrid here. Now in this I have to use keyboard actions using up and down arrows.
I have used KeyDown event and selection_changed event for first item only keydown event is firing. then selection_changed event is firing when up and down arrow keys pressed. But I want to do some action when enter key pressed after selecting a row in the grid. the code I have used is:`
private void dgsuggestion_KeyDown(object sender, KeyRoutedEventArgs e)
{
if (e.Key == Windows.System.VirtualKey.Enter)
{
}
}
private void dgsuggestion_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
ProductsList res= (ProductsList)((MyToolkit.Controls.DataGrid)sender).SelectedItem;
selectedsku = res;
}`
Can anyone help me..