Gridview rowupdating validation how to avoid dating cheaters

What I would like to to do is: When the gridview is opened for editing and on the click of the update button (required field validator and regular expression validator already in place in the datagrid template field), check that the user has put in a value less than or equal to the original quantity and greater than the value already stored in received quantity.

If the condition fails I want to pop up an alert telling the user why the row / cell wasn't updated and puts the focus back into the cell or cancels the editing event for the row... My rowupdating event is posted below and works fine, except for it allows any integer values greater than 0 to be updated into the datatable...

gridview rowupdating validation-67gridview rowupdating validation-26gridview rowupdating validation-84gridview rowupdating validation-70

You then have all the logic you need and give the user a cancel button and a update button to commit the change if it follows the business rule.I have developed a webform with an editable gridview. Each record contains from 1 to 3 signatures each with a date that the name was entered. When we define a LINQ to SQL data model, we will automatically have a default set of schema based validation constraints added to our data model classes.For example, if you try to set a null value for a required column, then the LINQ to SQL data model will raise an error to ensure our database integrity is maintained.The date is entered manually and validated on submission.

70

Leave a Reply