Пример #1
0
        private void BaseCariBarangView_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.F2:

                listDataGrid.ClearSelection();
                textBoxPencarian.SelectAll();
                textBoxPencarian.Focus();

                break;

            case Keys.Up:
            case Keys.Down:

                if (textBoxPencarian.Focused)
                {
                    listDataGrid.SelectedIndex = 0;
                }

                break;

            case Keys.Enter:

                OnEnterKeyDown?.Invoke(sender, e);

                break;

            case Keys.Escape:

                Close();

                break;
            }
        }
Пример #2
0
 private void listDataGrid_CellDoubleClick(object sender, CellClickEventArgs e)
 {
     OnEnterKeyDown?.Invoke(sender, e);
 }