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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

currentcellclosedropdown question

Thread ID:





25837 Mar 8,2005 04:00 PM UTC Mar 8,2005 08:24 PM UTC WinForms 8
Tags: GridControl
Philip Bishop
Asked On March 8, 2005 04:00 PM UTC

Is there an event that i can use that will fire when someone is in a dropdown cell and uses the keyboard to select the data in it instead of using the mouse which fires the currentcellclosedropdown event. i have some code that i want to happen any time they enter data in this either by using the mouse or using the keyboard which doesnt fire that event???

Philip Bishop
Replied On March 8, 2005 04:45 PM UTC

I wanted to add that id just basically like to be able to have it go to the currentcellclosedropdown event. i know i can chect the currentcellchanged and see what the colindex is to see if im in a col that has dropdowns, but i dont know how to then fire that event. maybe im thinking about it the wrong way.

Administrator [Syncfusion]
Replied On March 8, 2005 05:24 PM UTC

I am not sure what kind of dropdown cell you have or what keys you are trying to cacth, but you can try the CurrentCellControlKeyMessage event.
private void gridControl1_CurrentCellControlKeyMessage(object sender, GridCurrentCellControlKeyMessageEventArgs e)
	Keys keyCode = (Keys) ((int)e.Msg.WParam) & Keys.KeyCode;
	if(keyCode == Keys.Down || keyCode == Keys.Up)
		//e.CallProcessKeyPreview = false;
		//e.CallBaseProcessKeyMessage = true;

Administrator [Syncfusion]
Replied On March 8, 2005 06:26 PM UTC

One other comment is that CurrentCellCloseDropDown should be hit whether your user presses the Enter key to select something or clicks the mouse to select something. This event is hit for me in the \Syncfusion\Essential Suite\\Windows\Grid.Windows\Samples\CellTypes\ComboboxCells sample.

Philip Bishop
Replied On March 8, 2005 07:03 PM UTC

Clay, Here is sample. Click cell 1,2 and select one of the numbers. After you click the number notice it populates cell 1,3. Now if you arrow to a cell with say your down arrow key so you are on say a blank cell in 3,2 and this time type in number 3. Regardless of whether or not you hit enter after typing the 3 it never goes to the dropdownevent and i can only guess because i never opened and closed really? Does this help?? If it doesnt attach i will email it. Phil

Administrator [Syncfusion]
Replied On March 8, 2005 07:17 PM UTC

CurrentCellCloseDropDown will only be raised if the dropdown closes. If you you have never dropped the dropdown, this event will not be raised. This is by design. There are change events you can use to catch changes in a cell. You can try using CurrentCellChanged to catch all changes, but this event will be raised on each keystroke. If you only want to catch the change as you leave the cell, you can use CurrentCellValidating or CurrentCellAcceptedChanges.

Philip Bishop
Replied On March 8, 2005 07:29 PM UTC

Can you force the dropdown to open upon keystroke? so instead of just bringing that one in view like it does now can you make it be selected and have the drop down open?

Administrator [Syncfusion]
Replied On March 8, 2005 07:50 PM UTC

The method grid.CurrentCell.ShowDropDown will show the dropdown.

Philip Bishop
Replied On March 8, 2005 08:24 PM UTC

Thanks Clay. I just added that to my currentcellchanged event and it works perfect.


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