validation of a datagrid

  • Thread starter Thread starter claire
  • Start date Start date
C

claire

Hi,

I have a windows form with a datagrid. The datagrid is bound to a typed
dataset. Is there a built in validation function for windows forms? To
validate the text boxes i have extended the textbox. However i am not sure
how to perform validation on a datagrid.

should i just catch the sql exceptions?

Thank you in advance for any help you can give me, as i havent been able to
find the answer anywhere.

Claire
 
Hi claire,

Why don't you do this:
1. Check for the changes proposed in the datarow
2. Verify whether the changes are valid or not. If not, set the RowError property of the row. This will automatically make the datagrid show the ErrorProvider for that row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top