The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I am using the following code in my GDBG so that if the user is on a cell which is a combobox and hits the enter key the combobox will drop down:
Private Sub m_grid_CurrentCellKeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles m_Grid.CurrentCellKeyDown
Dim Row As Integer = m_Grid.CurrentCell.RowIndex
Dim Col As Integer = m_Grid.CurrentCell.ColIndex
If e.KeyValue = Keys.Enter then
If m_Grid(Row, Col).CellType = "ComboBox" Then
If Not m_Grid.CurrentCell.IsDroppedDown Then
m_Grid.CurrentCell.ShowDropDown()
e.Handled = True
End If
End If
end if
End Sub
Depending on certain conditions however, some of the cells in my grid which were initially set as "ComboBox" cells are being reset to "Static" in the PrepareViewStyleInfo method (e.Style.CellType = "Static"). This is properly keeping the combobox from dropping down when the mouse is clicked in these cells, however for some reason, if I type the enter key on the cell the above code still thinks the CellType is a ComboBox and attempts to show the drop down. This results in an error message "dropDownImp is Null". Any help on this would be appreciated.
Thanks,
Jeff
ADAdministrator Syncfusion Team February 15, 2005 11:26 PM UTC
Try moving the code that sets the ComboBox celltype from your PrepareViewStyleInfo into a grid.Model.QueryCellInfo event handler to see if this will handle this problem.