private void Window_PreviewKeyDown_1(object sender, KeyEventArgs e) { if (e.Key == Key.Down || e.Key == Key.Up) { //raise only when nothing is selected, otherway just move selection item in gridview up/down if(myDG.SelectedItem == null) myDG.SelectedIndex = 0; } {
myDG.Focus(); myDG.SelectedIndex = 0;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)