protected void grid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { this.it = objIT.GetIT(Int32.Parse(e.Keys[grid.KeyFieldName].ToString())); if (this.it != null) { this.objIT.DeleteIT(it); } grid.CancelEdit(); e.Cancel = true; this.grid.DataSource = objIT.GetITs(); this.grid.DataBind(); }
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { ASPxTextBox text = grid.FindEditFormTemplateControl("txtName") as ASPxTextBox; ASPxTextBox textId = grid.FindEditFormTemplateControl("txtId") as ASPxTextBox; this.it = objIT.GetIT(Int32.Parse(textId.Text)); if (this.it != null) { it.name = text.Text; it.isactive = true; this.objIT.UpdateIT(it); } grid.CancelEdit(); e.Cancel = true; this.grid.DataSource = objIT.GetITs(); this.grid.DataBind(); }