PAGING not working in ASP DataGrid

Discussion in 'ASP .Net' started by getziiiiiiiiiii, Mar 12, 2007.

  1. Hi There. . I need some help in paging (which is not working) in
    ASP:DATAGRID

    My Data source id is a function which returns DataTable to this
    datagrid.
    Do i need a code behind to get the next page working?

    thanks for help.

    this is how my data grid look like:

    <asp:datagrid
    ID="GridView"
    DataSourceID="ObjectDataSource"
    DataKeyField="id"

    AllowSorting="True"
    runat="server"
    AutoGenerateColumns="false"

    OnSelectedIndexChanged="GridView_SelectedIndexChanged"
    AllowPaging="True" PageSize="5"
    PagerStyle-Mode="NumericPages"
    >
     
    getziiiiiiiiiii, Mar 12, 2007
    #1
    1. Advertising

  2. getziiiiiiiiiii

    David Wier Guest

    When you say it isn't working - exactly what do you mean?
    Are you getting an error?

    --
    David Wier
    MVP/ASPInsider
    http://aspnet101.com
    http://aspexpress.com



    "getziiiiiiiiiii" <> wrote in message
    news:...
    > Hi There. . I need some help in paging (which is not working) in
    > ASP:DATAGRID
    >
    > My Data source id is a function which returns DataTable to this
    > datagrid.
    > Do i need a code behind to get the next page working?
    >
    > thanks for help.
    >
    > this is how my data grid look like:
    >
    > <asp:datagrid
    > ID="GridView"
    > DataSourceID="ObjectDataSource"
    > DataKeyField="id"
    >
    > AllowSorting="True"
    > runat="server"
    > AutoGenerateColumns="false"
    >
    > OnSelectedIndexChanged="GridView_SelectedIndexChanged"
    > AllowPaging="True" PageSize="5"
    > PagerStyle-Mode="NumericPages"
    > >

    >
     
    David Wier, Mar 12, 2007
    #2
    1. Advertising

  3. getziiiiiiiiiii

    Guest

    On Mar 12, 2:10 pm, "David Wier" <> wrote:
    > When you say it isn't working - exactly what do you mean?
    > Are you getting an error?
    >
    > --
    > David Wier
    > MVP/ASPInsiderhttp://aspnet101.comhttp://aspexpress.com
    >
    > "getziiiiiiiiiii" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Hi There. . I need some help in paging (which is not working) in
    > > ASP:DATAGRID

    >
    > > My Data source id is a function which returns DataTable to this
    > > datagrid.
    > > Do i need a code behind to get the next page working?

    >
    > > thanks for help.

    >
    > > this is how my data grid look like:

    >
    > > <asp:datagrid
    > > ID="GridView"
    > > DataSourceID="ObjectDataSource"
    > > DataKeyField="id"

    >
    > > AllowSorting="True"
    > > runat="server"
    > > AutoGenerateColumns="false"

    >
    > > OnSelectedIndexChanged="GridView_SelectedIndexChanged"
    > > AllowPaging="True" PageSize="5"
    > > PagerStyle-Mode="NumericPages"- Hide quoted text -

    >
    > - Show quoted text -



    In the PageIndexChanging event, set the PageIndex of the grid to be
    e.NewPageIndex.
     
    , Mar 13, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Coleen

    Datagrid Paging not working

    Coleen, Dec 31, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    4,529
    Coleen
    Dec 31, 2003
  2. wh1974
    Replies:
    0
    Views:
    2,491
    wh1974
    Jan 12, 2005
  3. Red
    Replies:
    1
    Views:
    767
  4. Replies:
    0
    Views:
    487
  5. J. Muenchbourg

    Paging not working in a datagrid

    J. Muenchbourg, May 27, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    4
    Views:
    167
    J. Muenchbourg
    May 29, 2004
Loading...

Share This Page