Hey everybody,
i have a webdatagrid which is autogeneratecolumns = false. The datasource is a dataset. I am using boundDataFields for the columns. These fields are getting the same datatype as the datatypes in the dataset.
Every column as a defaultvalue in the rowaddingcolumnsetting.The Primary Key Columns have "real" values and all the other column have system.dbnull.value as defaultvalue.
For updating the datasource, i am using the rowadding event of the grid. The values in RowAddingEventArgs are containing the correct(default-)values for the primary keys. But the other values for the columns with defaultvalue dbnull contains for example value 0 (zero) for the numeric columns and "" (empty string) for the string columns.
So i do not know wether the user entered a "real" 0 (zero) or nothing.
How can i receive an null-value for the columns in the RowAddingEventArgs?
Thanks a lot for your help!
Hello svsde,
I created a support ticket on your behalf to investigate this issue further.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Just an Update:
The same problem when updating a column. When deleting the value in a column (datatype system.int32), there is automatically a 0 (zero.) The same when deleting the value of a system.decimal column. After deleting the value is 0,0.
What do i have to do that the value of the column is null (system.dbnull), not 0 (zero)?
I tried to set the nullable value of the numericeditorprovider control to true. But this makes no difference.
After adding these bounddatafields to the column collection of a grid, i can see that the isnullable properties of the columns described above are false.
Is this correct?
Thanks again for your help!