protected void GvStaff_RowDeleting(object sender, GridViewDeleteEventArgs e) { StaffMst.Delete(Convert.ToInt32(GvStaff.DataKeys[e.RowIndex].Value)); DataTable StaffDT = StaffMst.GetAllActiveData(); GvStaff.DataSource = StaffDT; GvStaff.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable StaffDT = StaffMst.GetAllActiveData(); GvStaff.DataSource = StaffDT; GvStaff.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { DataTable StaffDT = StaffMst.GetAllActiveData(); GvStaff.DataSource = StaffDT; GvStaff.DataBind(); lblstaff.Text = GvStaff.Rows.Count.ToString(); } }