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.

Cancelling combo box editing

Thread ID:

Created:

Updated:

Platform:

Replies:

26109 Mar 14,2005 04:07 PM Mar 15,2005 09:57 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 14, 2005 04:07 PM

Hi, I have this sample project. I want to cancel combo editing in the current cell start editing handler. Not sure if it is the right place to cancel combo box. Please advise. hmm... I can''t seem to attach the sample project to this post. Anyway, I simply set the Cancel property to true in the CurrentCellStartEditing handler. However, I can still change the combo box value in the grid. thanks, Patrick

Administrator [Syncfusion]
Replied On March 14, 2005 04:46 PM

Try handling CurrentCellShowingDropDown and set e.Cancel = true there.

Administrator [Syncfusion]
Replied On March 14, 2005 05:03 PM

I did that too, this will only prevent showing the drop down part of the combo. Double clicking on the cell will cycle the list items. Could this be a bug?

Administrator [Syncfusion]
Replied On March 14, 2005 05:32 PM

The different events control different actions. So, if you want to use events to prevent a combobox from editing, dropping and double-clicking, then I think you will have to handle these three events and set e.Cancel in each to catch the three actions you are trying to prevent. CurrentCellStartEditing CurrentCellShowingDropDown CurrentCellChanging Depending on the exact behavior you want, you may be able to do without one of these events, but I think you will need two of them.

Administrator [Syncfusion]
Replied On March 15, 2005 09:57 AM

Handling CurrentCellChanging solved my problem. Thank you...

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.

;