c# GridView and Paging

I am using gridview to display items from database.When i select an item from dropdownlist the gridview items are displayed.I have enabled paging = true and given the datasource for gridview in dropdownlist_SelectedIndexChanged eventhandler.

When a item is selected the first page items are displayed.But when i go to the second page there are no items being displayed.

I have also used the eventhandler below:

protected void PageChanged(object sender, GridViewPageEventArgs e)

{

this.GridView1.PageIndex = e.NewPageIndex;

this.GridView1.DataBind();

}

What is the problem

Willfin David



Answer this question

c# GridView and Paging

  • KoeiTG

    Hi!

    The best place for asking ASP.NET questions is on the ASP.NET community site, and in the forums there. Check out http://www.asp.net/welcome.aspx tabindex=1&tabid=39.

    HTH,

    PEte



  • Faketone

    Hi,

    did you get this one resolved, my pages won't load the data and i made all pages and controls have the enableviewstate set to true.

    Thanks,

    Ronen


  • c# GridView and Paging