GridView Paging Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suganya
    New Member
    • Dec 2006
    • 39

    GridView Paging Problem

    I have displayed the data from the DB to the GridView made a column in the GridView as HyperLink allowed paging by setting the Allow Paging Property to "True". By clicking on the page no link I have to view other records. For that I have given the coding as


    protected void GridView1_PageI ndexChanging(ob ject sender, GridViewPageEve ntArgs e)
    {
    GridView1.PageI ndex = e.NewPageIndex;
    GridView1.DataB ind();
    }

    When I run, It shows the following error

    The GridView 'GridView1' fired event PageIndexChangi ng which wasn't handled.

    But when I set the Datasource Property of the GridView, then paging is running properly but the hyperlink button in the GridView is getting hided i.e the data without the hyperlink is getting displayed. The thing is I want both the page event to occur & the hyperlink field should also get displayed.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    GridView1.DataB ind(); only applies to have a binding datasource I think(DataSourc e=<something>)
    If you don't have one, the call will fail?

    Comment

    Working...