By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,297 Members | 1,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,297 IT Pros & Developers. It's quick & easy.

Setting Datagridview combobox column value to null.

P: 81
There's an editable datagridview populated from a table say tblItems. Among the columns of the datagridview there's a combobox column named 'Category'. This column is populated by the respective 'Category' column of tblItems. Now in the 'Category' column of the datagridview I want to set the value of a certain cell to Null programmatically. Suppose when I press keyboard Delete button over the cell or some other button on the form, the value of the cell becomes Null. Datagridview.keydown event isn't working as when the cell is selected the focus is actually on the editingcontrol of the cell and not the datagridview. Also the combobox editingcontrol doesn't have any 'SelectedIndex' property that can be set to -1. Any idea plz? Regards.
Jun 12 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.