We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Drop down the combobox on Enter Key

Hi, how can I convert the following code for the WinForms GridControl, to the WPF GridControl?
I can't find a find of over-riding the Enter key behaviour, or to programmatically drop down the combobox.

    'Key event customization
    Private Sub gridControl1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
        Dim currentCell As GridCurrentCell = GridControl1.CurrentCell
        Dim info As GridStyleInfo = GridControl1.Model(currentCell.RowIndex, currentCell.ColIndex)

        'Activate the enter key for combobox
        If e.KeyCode = Keys.Enter AndAlso info.CellType Is "ComboBox" Then
            e.Handled = True
            If Not currentCell.IsDroppedDown Then
                currentCell.ShowDropDown()
            Else
                currentCell.CloseDropDown(Syncfusion.Windows.Forms.PopupCloseType.Canceled)
            End If
            Return
        End If           

    End Sub

Kind Regards

Mike
 

1 Reply

GA Gayathri Arumugam Syncfusion Team May 9, 2017 04:23 AM UTC

  
Hi Mike, 

We have created a sample based on your requirement ”DropDown the ComboBox on enter key”. kindly refer the below sample link. 

Sample Link: 

Please let us know if you need further assistance.  

Regards, 
Gayathri 


Loader.
Live Chat Icon For mobile
Up arrow icon