My datagrid control is not updating properly. It does in fact correctly go into edit mode when I click the link in the EditCommandColumn. In edit mode, it properly shows a text box for the field that allows editing, and it also shows an UPDATE button and a CANCEL button.<BR><BR>The problem is that, when I click on the UPDATE button or on the CANCEL button, nothing happens. Apparently, the OnCancelCommand and the OnUpdateCommand are not working properly. I have checked the msdn documentation here ( opic.asp ), and I still fail to see the problem in my code.<BR><BR>Here is the code that I have, can anyone show me how to fix it?<BR><BR>my data grid code:<BR>-----------------------------------------------------------------<BR> &#060;asp:DataGrid id="MyDataGrid" runat="server" width="100%" BorderWidth="0" CellPadding="3" AutoGenerateColumns="false" OnItemCommand = "Edit_Menu" OnCancelCommand = "MyDataGrid_Cancel" OnUpdateCommand = "MyDataGrid_Update"&#062;<BR> &#060;HeaderStyle CssClass="tit2" BackColor="#CCCCCC"&#062;<BR> &#060;/HeaderStyle&#062;<BR> &#060;ItemStyle CssClass="tit4"&#062;<BR> &#060;/ItemStyle&#062;<BR> &#060;Columns&#062;<BR> &#060;asp:BoundColumn ReadOnly = "True" DataField = "ItemID" HeaderText = "Item Number" /&#062;<BR> &#060;asp:BoundColumn ReadOnly = "True" DataField = "ItemName" HeaderText = "Item Name" /&#062;<BR> &#060;asp:BoundColumn DataField = "ItemQty" HeaderText = "Number Of Servings" /&#062;<BR> &#060;asp:EditCommandColumn EditText = "Edit Info" ButtonType = "LinkButton" UpdateText = "Update" CancelText = "Cancel" /&#062;<BR> &#060;/Columns&#062;<BR> &#060;/asp:DataGrid&#062;<BR>-----------------------------------------------------------------<BR>my OnItemCommand event handler code:<BR>-----------------------------------------------------------------<BR> Sub Edit_Menu(sender as Object, e as DataGridCommandEventArgs)<BR> MyDataGrid.EditItemIndex = e.Item.ItemIndex<BR> Display_Cart()<BR> End Sub<BR>-----------------------------------------------------------------<BR>my OnUpdateCommand handler code:<BR>-----------------------------------------------------------------<BR> Sub MyDataGrid_Update(sender As Object, e As DataGridCommandEventArgs)<BR> Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("C onnectionString"))<BR><BR> &#039;Read in the values of the updated row<BR> Dim iProductID as Integer = e.Item.Cells(0).Text<BR> Dim strName as String = e.Item.Cells(1).Text<BR> Dim iQuantity As Integer = CType(e.Item.Cells(2).Controls(0), TextBox).Text<BR> Response.Write("ItemID = ")<BR> Response.Write(iProductID)<BR> Response.Write("<BR>")<BR> Response.Write("Quantity = ")<BR> Response.Write(iQuantity)<BR> Response.Write("<BR>")<BR>&#039; other code that I am omitting 4 brevity because the Response.Write above should be enough of a test<BR><BR> &#039;Finally, set the EditItemIndex to -1 and rebind the DataGrid<BR> MyDataGrid.EditItemIndex = -1<BR> tblMenu.Visible = True<BR> Display_Cart()<BR> End Sub<BR>-----------------------------------------------------------------<BR>my OnCancelCommand code:<BR>-----------------------------------------------------------------<BR> Sub MyDataGrid_Cancel(sender As Object, e As DataGridCommandEventArgs)<BR> MyDataGrid.EditItemIndex = -1<BR> Display_Cart()<BR> End Sub<BR>-----------------------------------------------------------------<BR>when I click on the UPDATE command or the CANCEL command, I should at least get some error message or some of the Response.Write output listed above, but instead I get no change. The page simply re-outputs the datagrid in edit mode, the way it looked before I made the chances that I just tried to submit. The UPDATE and CANCEL buttons are still there, and the previous value is in the text box. (The new value that I had tried to change the textbox to is gone.)<BR>