protected void gvFiling_PageIndexChanging(Object sender, GridViewPageEventArgs e) { List<DataKey> datakeys = new List<DataKey>(); foreach (GridViewRow row in gvFiling.Rows) { if (((CheckBox)row.FindControl("cbxApply")).Checked) { datakeys.Add(gvFiling.DataKeys[row.RowIndex]); } else datakeys.Remove(gvFiling.DataKeys[row.RowIndex]); } if (SessionWrapper.RelatedFilingsRecordsList != null) { List<DataKey> sessionList = new List<DataKey>(); sessionList = SessionWrapper.RelatedFilingsRecordsList; foreach (DataKey dk in datakeys) { foreach (GridViewRow row in gvFiling.Rows) { sessionList.Add(dk); } } SessionWrapper.RelatedFilingsRecordsList = sessionList; } else SessionWrapper.RelatedFilingsRecordsList = datakeys; }
public static List<System.Web.UI.WebControls.DataKey> RelatedFilingsRecordsList { get { if (HttpContext.Current.Session["RelatedFilingsRecordsList"] != null) return (List<System.Web.UI.WebControls.DataKey>)HttpContext.Current.Session["RelatedFilingsRecordsList"]; else return null; } set { HttpContext.Current.Session["RelatedFilingsRecordsList"] = value; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)