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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CellType Problem

Thread ID:

Created:

Updated:

Platform:

Replies:

24985 Feb 15,2005 05:27 PM Feb 15,2005 06:26 PM Windows Forms 1
loading
Tags: GridControl
Jeff Lancaster
Asked On February 15, 2005 05:27 PM

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

Administrator [Syncfusion]
Replied On February 15, 2005 06:26 PM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;