G
Guest
let me set the stage for my question..
A C# winform with one datagrid on it.
A DataTable dt that has some data in it bound to the datagrid using
setbindings().
The Table has these columns in it.
First
Middle
Last
Address
Customer_id
Now, I create a data table style for the datagrid cause I just wanted to
show the First, Middle, and Last name. Not the address.
My question is this... How can I trap when the DataGrid tries to commit the
data I entered in the datagrid to the new data row it created? The reason is
I do not allow the address to be null so when the DataGrid tries to commit
the data to the new datarow it thorws an error about the address field being
blank. What I want to do is trap the commit to validate the data.
Ok, I have tried trapping the RowChanged, and RowChanging events from the
datable but these doesn't get called until sometime after the datagrid has
committed the data to the new datarow.
A C# winform with one datagrid on it.
A DataTable dt that has some data in it bound to the datagrid using
setbindings().
The Table has these columns in it.
First
Middle
Last
Address
Customer_id
Now, I create a data table style for the datagrid cause I just wanted to
show the First, Middle, and Last name. Not the address.
My question is this... How can I trap when the DataGrid tries to commit the
data I entered in the datagrid to the new data row it created? The reason is
I do not allow the address to be null so when the DataGrid tries to commit
the data to the new datarow it thorws an error about the address field being
blank. What I want to do is trap the commit to validate the data.
Ok, I have tried trapping the RowChanged, and RowChanging events from the
datable but these doesn't get called until sometime after the datagrid has
committed the data to the new datarow.