Click to See Complete Forum and Search --> : validator problem: help required please


devpro
June 19th, 2001, 05:04 PM
I have a DataGrid with the Edit column, and below I have a table with some fields and a Submit button. The user should be able to:
1) modify the elements in the Grid (and this works fine)
2) Fill the text fields, press submit and add the record to the DB (and so to the grid, during the next refresh)

The problem is that I have a RequiredFieldValidator control to require some text in the TextBox, and it validates the textbox on any postback, for any reasons. Now, of course I want to validate the content of the textbox only if the user presses the "Submit (add new" button, not if he presses the Grid's Modify buttons or other buttons that are on the form.

How to solve the problem?
Thanx

- devpro