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

GridDropDownStyle and combobox

Thread ID:





34194 Sep 6,2005 08:49 AM UTC Sep 6,2005 01:30 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On September 6, 2005 08:49 AM UTC

Hi together, I have gridgroupingcontrol with a cell value of celltype "ComboBox". Furthermore the GridDropDownStyle attribute is set to "Exclusive". How can I prevent that a user can delete the content of this cell (then I get a blank cell with an down arrow on the right). I want that always one member of the dropdownlist is visible in the cell. Cheers, Markus

Administrator [Syncfusion]
Replied On September 6, 2005 12:34 PM UTC

Hi Markus You can catch the pressing of Delete key in the TableControlCurrentCellKeyDown event and make its "Handled" property true if it is a combobox column. private void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlKeyEventArgs e) { if(this.gridGroupingControl1.TableControl.CurrentCell.ColIndex == 3) { if (e.Inner.KeyCode == Keys.Delete || e.Inner.KeyCode == Keys.Back ) e.Inner.Handled = true; } } Attached is a sample. DeleteComboBox_3088.zip

Administrator [Syncfusion]
Replied On September 6, 2005 01:30 PM UTC

Thanks Mouli - that works!


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