-1

I have a DataGridView that has a few DataGridViewComboBoxColumns. When attempting to use the ComboBoxColumns they have a few user annoyances I want to resolve but don't know how.

1) PageUp and PageDown change DataGridView Rows, instead of values within the combobox when the selection window is up.

2) You have to double or triple click to get the dropdown to show. I would like it to be a single click.

The object is a standard DataGridView with no special overrides on these settings. Any help would be greatly appreciated. Thanks.

1 Answers1

0

If you handel the keydown event for the combobox, you can change the selected index or text value of the combobox when the page up or down keys are pressed, like this:

    Private Sub cbx_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbx.KeyDown 

        If e.KeyCode = Keys.PageDown Then
            'change the selected index on the combobox +1
            e.Handled = True
        ElseIf e.KeyCode = Keys.PageUp Then
            'Change the selected index -1
            e.Handled = True
        End If
    End Sub
Hawkeye
  • 578
  • 8
  • 20