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.

Derived ComboBox

Thread ID:

Created:

Updated:

Platform:

Replies:

3728 Apr 3,2003 11:42 PM Apr 4,2003 05:00 AM Windows Forms 3
loading
Tags: GridControl
Peter
Asked On April 3, 2003 11:42 PM

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? Regards Peter

Administrator [Syncfusion]
Replied On 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
        End If
End Function
2) After closing the dropdown, try calling CurrentCell.Refresh to see if that handles things, or you might also try calling CurrentCell.ConfirmChanges().

Administrator [Syncfusion]
Replied On 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)

Peter
Replied On April 4, 2003 05:00 AM

Thanx Clay, I tried ConfirmChanges and it works. Peter

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.

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.

;