I feel like this should be easy....
I have a web form with a data adapter and a datagrid. I simply want to be able to use the data grid link buttons for edit, update, etc to modify my database table.
I can edit the row on the web form, but the update code nevers seems to get run against the database (I am using SQL Profiler so I know the code never hits the DB). Shouldn't this happen when I call the update method of the sql data adapter ?!?
I used the data adapter wizard to generate the update, delete commands (I know I could do this other ways but now I want to solve this problem). Here are my relevant event handlers:
VB Code:
Private Sub grdItems_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles grdItems.EditCommand grdItems.EditItemIndex = e.Item.ItemIndex grdItems.DataBind() End Sub Private Sub grdItems_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles grdItems.UpdateCommand adpMatDwg.Update(dsItems, "UDTMaterialDrawing") grdItems.EditItemIndex = -1 grdItems.DataBind() End Sub
Thanks in advance!




Reply With Quote