D
Doc Dunning
Hi all,
This seems such a simple problem to me but I can't find the answer after
*much* searching.
I have an application using bound controls to browse / update a database
table of club member details. It uses a data grid view to scroll up and
down the list of names, and if I select a row, then some bound text boxes
show the details for the person I've selected. I can edit the text boxes,
and when I click a different row in the grid, any changes I've made are
reflected back into the database. Wonderfully easy to get this far!
But now I want to validate the entries in the text boxes. For example - the
person's surname must not be blank. Seems fair enough to me. I've managed
to find the "rowchanging" event and added the validation in there. I've
been able to add an error provider as well, which uses the "setcolumnerror"
values. If I go back to that record again, t shows a red blob against the
field in error, but ...
.... whatever I do, I can't find how to stop the invalid values being put
back into the dataset :-(. I want to trap the error, point it out to the
user, and have them correct it *before* the row is updated, all before we
navigate away to the next record. This is such common interface design that
it just has to be easy to do, and yet I can't see how.
Any pointers to the solution from out there?
Thanks in advance.
This seems such a simple problem to me but I can't find the answer after
*much* searching.
I have an application using bound controls to browse / update a database
table of club member details. It uses a data grid view to scroll up and
down the list of names, and if I select a row, then some bound text boxes
show the details for the person I've selected. I can edit the text boxes,
and when I click a different row in the grid, any changes I've made are
reflected back into the database. Wonderfully easy to get this far!
But now I want to validate the entries in the text boxes. For example - the
person's surname must not be blank. Seems fair enough to me. I've managed
to find the "rowchanging" event and added the validation in there. I've
been able to add an error provider as well, which uses the "setcolumnerror"
values. If I go back to that record again, t shows a red blob against the
field in error, but ...
.... whatever I do, I can't find how to stop the invalid values being put
back into the dataset :-(. I want to trap the error, point it out to the
user, and have them correct it *before* the row is updated, all before we
navigate away to the next record. This is such common interface design that
it just has to be easy to do, and yet I can't see how.
Any pointers to the solution from out there?
Thanks in advance.