470,810 Members | 1,266 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Setting Datagridview combobox column value to null.

88 64KB
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
0 1521

Post your reply

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

Similar topics

2 posts views Thread by Fred | last post: by
2 posts views Thread by Greg | last post: by
1 post views Thread by Terry Olsen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.