How to know if a datagrid item will be displayed in a datagrid with pagging

Discussion in 'ASP .Net Datagrid Control' started by CFirmino, Apr 2, 2004.

  1. CFirmino

    CFirmino Guest

    My problem is to know if a datagrid item will be displayed in a
    datagrid with paging. My dataset has hundreds of rows, of wich i'm
    only showing 5 at a time.
    On the ItemDataBound Event i want to know if the current datagrid item
    is the
    first one showing on the selected page. Is there some property that
    tells if the item will be displayed ?

    Thanks for the help

    CFirmino
     
    CFirmino, Apr 2, 2004
    #1
    1. Advertising

  2. There is no property which you can call. You will have to roll your own
    function. You know the current page, find the index of the item in the
    dataset and calculate the previous pages and determine if the current page +
    5 contains the item

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/27cok
    "CFirmino" <> wrote in message
    news:...
    > My problem is to know if a datagrid item will be displayed in a
    > datagrid with paging. My dataset has hundreds of rows, of wich i'm
    > only showing 5 at a time.
    > On the ItemDataBound Event i want to know if the current datagrid item
    > is the
    > first one showing on the selected page. Is there some property that
    > tells if the item will be displayed ?
    >
    > Thanks for the help
    >
    > CFirmino
     
    Alvin Bruney [MVP], Apr 4, 2004
    #2
    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. boney
    Replies:
    1
    Views:
    593
  2. Replies:
    1
    Views:
    437
    Andy Dingley
    Feb 21, 2007
  3. mkhmer

    Grid fails to sort by column when pagging

    mkhmer, Apr 20, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    155
    mkhmer
    Apr 20, 2006
  4. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    262
    Gregory Toomey
    Apr 23, 2004
  5. Replies:
    0
    Views:
    99
Loading...

Share This Page