protected void GridView_Category_RowUpdating(object sender, GridViewUpdateEventArgs e) { try { GridViewRow row = (GridViewRow)GridView_Category.Rows[e.RowIndex]; int ID = UDFLib.ConvertToInteger(GridView_Category.DataKeys[e.RowIndex].Values[0].ToString()); string Worklist_Type = (((HiddenField)row.FindControl("hdnWorklist_Type")).Value); string Worklist_Type_Display = (((TextBox)row.FindControl("txtWorklist_Type_Display")).Text.Trim()); if (Worklist_Type_Display.Trim().Length == 0) { string hidemodal = String.Format("alert('Worklist Type Display is mandatory field')"); ScriptManager.RegisterStartupScript(Page, Page.GetType(), "hidemodal", hidemodal, true); return; } GridView_Category.EditIndex = -1; BLL_Tec_WorklistType.TEC_UPD_WORKLISTTYPE(Worklist_Type, Worklist_Type_Display); Search_Worklist_Type(); } catch { } }
protected void Search_Worklist_Type() { DataTable dt = BLL_Tec_WorklistType.TEC_GET_WORKLISTYPE().Tables[0]; GridView_Category.DataSource = dt; GridView_Category.DataBind(); }