Posted on: 5/9/2014 3:52:40 PM | Views : 310

I have gridview in a webpage which display a large table. I set enable paging on.
In the web page, it has GridView_DataBound as below:
protected void GridView1_DataBound(object sender, EventArgs e) {
       QueryClass.DataBound(sender, e);
}
then in a QueryClass it has method like:
public static void DataBound(object sender, EventArgs e) {
      GridView gridView1 = (GridView)sender;
      for (int i = 0; i < gridView1.PageCount; i++)
      {
          ListItem pageListItem = new ListItem(string.Concat("Page ", i + 1), i.ToString());
          DropDownList ddl = (DropDownList)gridView1.FindControl("DropDownListPageList");
          ddl.Items.Add(pageListItem);
    &nb ...

Go to the complete details ...