1. How can I capture key events in the list derived from GridComboBoxListBoxPart when deriving own CellType from GridComboBox? I want to allow the user to change the selection in the ComboBox with keys or mouse. Therefor I need to capture key events to change selection on Arrow Up/Down and Enter.
2. I capture the MouseUp event of the list box part and change the controlvalue to the selected value. Then I do a HidePopup(PopupType.Done) to close the listboxpart. However the current cell isn't redrawn correctly. Am I doing anything wrong - meaning is there a better way to change ControlValue and close the dropdown or why it isn't redrawn?
ADAdministrator Syncfusion Team April 4, 2003 02:02 AM
1) You might be able to do this work in the renderer's ProcessKeyEventArgs. Catch the mousdouwn, get the keystroke, do the work and then return true.
Protected Overrides Function ProcessKeyEventArgs(ByRef m As System.Windows.Forms.Message) As Boolean
If m.Msg = WM_KEYDOWN Then
Dim keyCode As Keys = CType(m.WParam.ToInt32(), Keys) And Keys.KeyCode
System.Console.WriteLine("KeyDown ->" + keyCode.ToString())
Return True 'handled
2) After closing the dropdown, try calling CurrentCell.Refresh to see if that handles things, or you might also try calling CurrentCell.ConfirmChanges().
ADAdministrator Syncfusion Team April 4, 2003 03:58 AM
2) Something else to try is to call CurrentCell.CloseDropDown instead of calling HidePopup directly (you bypass the grid otherwise and the grid can’t react)
PEPeterApril 4, 2003 05:00 AM
I tried ConfirmChanges and it works.