Hi
Please can someone offer me advice relating to the following scenario?
I am using a third party grid control bound to a table in SQL Server Express.
If a record is selected in the grid, a datarow is returned containing the record. At this point I instantiate a new form class that holds properties relating to the selected datarow. These are used to Display the record.
(This is where I get confused.)
1) How do I handle validation?
I am using an error provider control to validate mandatory fields in the 'ok' button click event. If the validation fails the form still closes. Do I have to cancel the button click event?
(If so, how? I tried 'Exit Sub') Or is there another approach?
2) How do I write changes back to the database and reflect those changes on the underlying selection grid?
Do I use stored procedures, or somehow reference the underlying grid to add rows?
Any help or samples would be greatly appreciated.
Thanks
Please can someone offer me advice relating to the following scenario?
I am using a third party grid control bound to a table in SQL Server Express.
If a record is selected in the grid, a datarow is returned containing the record. At this point I instantiate a new form class that holds properties relating to the selected datarow. These are used to Display the record.
(This is where I get confused.)
1) How do I handle validation?
I am using an error provider control to validate mandatory fields in the 'ok' button click event. If the validation fails the form still closes. Do I have to cancel the button click event?
(If so, how? I tried 'Exit Sub') Or is there another approach?
2) How do I write changes back to the database and reflect those changes on the underlying selection grid?
Do I use stored procedures, or somehow reference the underlying grid to add rows?
Any help or samples would be greatly appreciated.
Thanks