Datagrid EditCommandButton CausesValidation

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>
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top