> protected void grdCTInventoryGrid_RowUpdating(object sender, GridViewUpdateEventArgs e) > { > // Get the item to be updated > this.grdCTInventoryGrid.EditIndex = e.RowIndex; > > // Retrieve the previous DataSet > DataSet dsCTInventory = (DataSet)Session["dsCTInventory"]; > > // Save the DataSet (the GridView automatically binds back) > this.Save(this.oCTInventory, dsCTInventory); > > dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Code"] = (string)dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Code"].ToString().ToUpper(); > dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Group1"] = (string)dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Group1"].ToString().ToUpper(); > dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Group2"] = (string)dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Group2"].ToString().ToUpper(); > dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Descr"] = (string)dsCTInventory.Tables["CtInventory"].Rows[e.RowIndex]["Inv_Descr"].ToString().ToUpper(); > > this.oCTInventory.SetCurrentDataSet(dsCTInventory); > > // Save the DataSet (the GridView automatically binds back) > this.Save(this.oCTInventory, dsCTInventory); > > // Reset the edited item and rebind the GridView > this.grdCTInventoryGrid.EditIndex = -1; > this.BindControl(this.grdCTInventoryGrid); > } > >