Hello,
I have a grid bound to a DataTable where some numeric cells come in as blank, as the data behind is dbnull. This is a perfectly valid condition, as those cell do not require the user to enter a number.
However, after I click on those cells I enter edit mode, and while in edit mode I am required to enter a number, otherwise it doesn't let me leave the edit mode. I can alway press ESC to leave the edit mode, but then it leaves the old value in the cell. The side effect of this behaviour is that it doesn't let me change a cell that already has a number into a blank (dbnull), which should be perfectly legal in our case.
When trying to validate the blank numeric cell the output window is showing an error message from the system exception saying the dbnull value cannot be converted to a nullable Single.
Is there any switch, any grid property or any flag that allows to validate blank numeric cells and convert them to dbnull?
Thank you
I have a grid bound to a DataTable where some numeric cells come in as blank, as the data behind is dbnull. This is a perfectly valid condition, as those cell do not require the user to enter a number.
However, after I click on those cells I enter edit mode, and while in edit mode I am required to enter a number, otherwise it doesn't let me leave the edit mode. I can alway press ESC to leave the edit mode, but then it leaves the old value in the cell. The side effect of this behaviour is that it doesn't let me change a cell that already has a number into a blank (dbnull), which should be perfectly legal in our case.
When trying to validate the blank numeric cell the output window is showing an error message from the system exception saying the dbnull value cannot be converted to a nullable Single.
Is there any switch, any grid property or any flag that allows to validate blank numeric cells and convert them to dbnull?
Thank you