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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Derived ComboBox

Thread ID:





3728 Apr 4,2003 04:42 AM UTC Apr 4,2003 10:00 AM UTC WinForms 3
Tags: GridControl
Asked On April 4, 2003 04:42 AM UTC

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 07:02 AM UTC

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 08:58 AM UTC

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)

Replied On April 4, 2003 10:00 AM UTC

Thanx Clay, I tried ConfirmChanges and it works. Peter


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon