protected void GridInfo_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridInfo.PageIndex = e.NewPageIndex; GridInfo.DataSource = ViewState["dt"]; GridInfo.DataBind(); GroupRows(GridInfo, 0); }
private void BindGrid() { if (hfOrgID.Value != "0") { strwhere += " and getstationorgid(e.org_id)=" + hfOrgID.Value; } else { int railSystemId = PrjPub.GetRailSystemId(); if (railSystemId != 0) { strwhere += " and (GetRailSystemId(e.org_id)=" + railSystemId + " or getstationorgid(e.org_id)=" + PrjPub.CurrentLoginUser.StationOrgID + ")"; } } GridInfo.DataSource = GetInfo(); GridInfo.DataBind(); ViewState["dt"] = GridInfo.DataSource; }