Home All Groups Group Topic Archive Search About

DataGrid & Form on Same Page Post Issue

Author
4 Mar 2005 3:06 PM
Paul D. Fox
I have a datagrid that does and edit/update/delete/cancel routine and then I
have a form at the bottom of the page with an "Add" button to add a another
record.  This form as validation (e.g. required fields), so when I click on
"Edit" in the datagrid and then "update" it, the form's validation summary
gets executed.  How can I update the datagrid without getting the form
"posted", or at least not run the validation ?

Paul

Author
5 Mar 2005 10:09 PM
Elton Wang
Hi Paul,

You might use following logic:

In EditCommand (Go to Update state)
   disable validation
   (may also disable Add button)
In UpdateCommand & CancellCommand (Return to normal state)
   enable validation
   (enable Add button)

HTH

Elton Wang
elton_w***@hotmail.com


>-----Original Message-----
>I have a datagrid that does and edit/update/delete/cancel
routine and then I
>have a form at the bottom of the page with an "Add"
button to add a another
>record.  This form as validation (e.g. required fields),
so when I click on
>"Edit" in the datagrid and then "update" it, the form's
validation summary
>gets executed.  How can I update the datagrid without
getting the form
Show quoteHide quote
>"posted", or at least not run the validation ?
>
>Paul
>
>
>.
>