I have 2columns on my grid that use a drop down (combo) box with a value list. The display value is merely text while the underlying member data of the drop down is a Guid.
I want to be able to "reset" (have the grid show nothing selected) drop down A when drop down B has a value selected out of it. Conversely I want to "reset" (have the grid show nothing selected) drop down B when an item in drop down A has been selected.
When I try to set the .Value property of the cell for the active row, I get the error can't convert a string to a Guid. I understand that this relates to my underlying data in my drop down.
What property/event can I use to make this work?
You could set the cell value to Guid.Empty, although the result would be the cell would show a guid with all zeroes rather than nothing at all. Another approach would be (assuming the associated column supports null values) to set the cell value to null, in which case nothing would be selected and no text would show since there is no item selected. Along the same lines, you could add one item to the list with a DataValue of null or DbNull (or, come to think of it, Guid.Empty) and a space char as the display text.