G
Guest
I have a problem in the order that events are fired when adding new rows to a typed Dataset
The problem is i have a multi filed primary key, and some of the fields are not set by the user, ie, they are set in code
The problem is that the DataSet is validating the row and rejecting it before my code has a chance to set the values in the primary keys. Eg
1) The user goes to a new row in a DataGrid to add a new recor
2) They fill in some field
3) ColumnChanging and ColumnChanged events occur naturall
4) The user moves off the row and the framework code immediately fails because one of the primary keys is null
5) The RowChanging event never occurs
To me this is a bug - the RowChanging event should always fire first to give the user (ie my code) a chance to set values and do some internal validation. The dataset can then perform its validation before firing the RowChanged event
If by design, then its bad design
Regard
Michae
The problem is i have a multi filed primary key, and some of the fields are not set by the user, ie, they are set in code
The problem is that the DataSet is validating the row and rejecting it before my code has a chance to set the values in the primary keys. Eg
1) The user goes to a new row in a DataGrid to add a new recor
2) They fill in some field
3) ColumnChanging and ColumnChanged events occur naturall
4) The user moves off the row and the framework code immediately fails because one of the primary keys is null
5) The RowChanging event never occurs
To me this is a bug - the RowChanging event should always fire first to give the user (ie my code) a chance to set values and do some internal validation. The dataset can then perform its validation before firing the RowChanged event
If by design, then its bad design
Regard
Michae