I have a ComboBoxEditor for one of the columns on my grid. However, it seems to me that the text area of the WinComboBox cannot fit into the cell entirely because the bottom part of the text on the cell got truncated partially when I’m trying to edit the cell. (The text looks fine when the focus is away from the cell though.)
However, the height of each row on the grid has become larger and I don’t prefer this appearance. Is there a way to change the height of the ComboBoxEditor? If not, is there other way to solve the problem I mentioned above?
Thanks in advance.
Imported from legacy forums. Posted by Sop (had 704 views)
You can do the same (set FitHeightToEditors to true) on the fly when the ComboBox is being activated, and then set it back to false when it is deactivated. Use the ActivatingControl/DeactivatingControl events to accomplish this.
private void Form1_Load( object sender, EventArgs e )
“SupplierID” ].CellEditorManager.ActivatingControl += new CellEditorEventHandler( SupplierID_CellEditorManager_ActivatingControl );
“SupplierID” ].CellEditorManager.DeactivatingControl += new CellEditorEventHandler( SupplierID_CellEditorManager_DeactivatingControl );
void SupplierID_CellEditorManager_ActivatingControl( object sender, CellEditorEventArgs e )
void SupplierID_CellEditorManager_DeactivatingControl( object sender, CellEditorEventArgs e )
Imported from legacy forums. Posted by André (had 708 views)