Does anyone know how to set causes validation to false when a datagrid edit/update/cancel linkbutton is fired? I have heard that it is done in the ItemCommand event but i am struggling to figure that out. Any suggestions?
1)
Private Sub myDatalist_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles myDatalist.ItemDataBound
If e.Item.ItemType = ListItemType.EditItem Then
CType(e.Item.FindControl("lbtnItemUpdate", LinkButton).CommandArgument = e.Item.ItemIndex
end if
end sub
2)
Private Sub myDatalist_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles myDatalist.ItemCommand
If e.CommandName = "Update" Then
If e.Item.ItemIndex = e.CommandArgument And e.Item.ItemType = ListItemType.EditItem Then
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.