|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Stop datagrid causing validationI have a Datagrid with the first Column as Edit. Clicking
on Edit displays the usual Update and Cancel Links/Buttons. However, after I click on Edit and then change my data, when I click on Update the Link/Button Causes Validation on 2 Empty Text boxes further down the page which are used only for adding a new Row. So how do I prevent the Update Link/Button from Causing Validation and firing the Required Field Validators on the textboxes? You'll have to build your own TemplateColumn and add in those Edit/Cancel/Update
buttons yourself. On the Buttons add the CausesValidation=false property. For the Buttons to work with the DataGrid you'll need to set their CommandName="Edit", CommandName="Cancel" and CommandName="Update" so the grid knows that they were clicked. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > I have a Datagrid with the first Column as Edit. Clicking on Edit > displays the usual Update and Cancel Links/Buttons. However, after I > click on Edit and then change my data, when I click on Update the > Link/Button Causes Validation on 2 Empty Text boxes further down the > page which are used only for adding a new Row. So how do I prevent > the Update Link/Button from Causing Validation and firing the Required > Field Validators on the textboxes? >
IE Web Controls - discontinued ???
custom validator and button events Re: At which life cycle should EnsureChildControls() be called? Dynamically resize a DropDownList in a grid when dropped down Cant Render Page Control with Visual Studio 2005 Beta Control Template How do I post hidden variables to another form from a popup? Custom Templated Control not rendering asp.net controls correctly Enter Key form with many UserControls DataGrid1 UpdateCommand calling DataGrid2 UpdateCommand |
|||||||||||||||||||||||