Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1705
Allow null with DropDownValidate
posted

Hey guys,

I need a combo box that validates the value entered and also it allows empty values.

DropDownValidate seems to do the trick since it offers type-ahead functionality and it also verifies the value entered is part of the data source.

The problem is that even when the underlying column type is string (obviously allows nulls) and also an empty item (and a null item) has been added to the list, the grid keeps showing the following message:

 

"Unable to update the data value: Value in the editor is not valid"

 

Is this expected behavior? so does DropDownValidate definitely not like nulls?

I read somewhere that a solution is to validate manually with the BeforeCellUpdate event. So I was writing to see if this the "best and easy" way to do it. Since it looks to me that the DropDownValidate style has a silly limitation.

 

Thanks.