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

Cancelling combo box editing

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

4 Replies

AD Administrator Syncfusion Team March 14, 2005 09:46 PM UTC

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

AD Administrator Syncfusion Team March 14, 2005 10:03 PM UTC

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?

AD Administrator Syncfusion Team March 14, 2005 10:32 PM UTC

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.

AD Administrator Syncfusion Team March 15, 2005 02:57 PM UTC

Handling CurrentCellChanging solved my problem. Thank you...

Live Chat Icon For mobile
Up arrow icon