Ashutosh
10/31/2008 11:43:00 AM
Hi,
I have a typed dataset assigned to a DataGridView. There are some
columns which can be null according to the table structure(this can't be
changed under any circumstances).
Now, when I am adding a new row using DataGridView, some columns remains
NULL. I want to set the value of these columns to Zero (numeric 0) when
updating the database.
For this I tried to handle the RowChanging event and set the value if
the value is DBNull. But it doesn't allow me to set the value. It throws
an exception.
How can I achieve this?
Thanks & Regards,
Ashutosh