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
248
RowAdding - Null Values in RowAddingEventArgs
posted

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!

Parents
No Data
Reply Children
No Data