Datagrid EditCommandButton CausesValidation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Having an issue with the datagrid.... Instead of actually updating everytime
someone selects update in the datagrid, I am currently writing an XML file on
the server that consists of the datagrid changes, to which, when the "Submit"
button is selected it will then do the update (including the XML file). The
problem is that the EditCommandButton->Update does the "causesValidation".
The Cancel and Edit do not. Therefore, when update is selected, the entire
form goes through the CausesValidation Process, which I don't want.
Suggestions?

<asp:EditCommandColumn HeaderText="Edit" ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
</asp:EditCommandColumn>
 
RESOLVED!!!!

Private Sub MyDataGrid_ItemCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
MyDataGrid.ItemCreated

If e.Item.ItemType = ListItemType.EditItem Then

Dim lnkUpdate As LinkButton = CType(e.Item.Cells(4).Controls(0),
LinkButton)
lnkUpdate.CausesValidation = False

End If
End Sub
 
Back
Top