Access to Pager on Client-Side

6 posts, 0 answers
  1. Big B
    Big B avatar
    7 posts
    Member since:
    Jul 2009

    Posted 29 Jul 2009 Link to this post

    I want to show/hide pager on the client-side.
    For example, a RadGrid has less just one page or has groupings - pager should not be visible .

    Thank you in advance!


  2. Jose
    Jose avatar
    49 posts
    Member since:
    Aug 2008

    Posted 29 Jul 2009 Link to this post

    Hi Vasyl.

    I believe you can accomplish that without client-side code. Just by setting this properties:

    AllowPaging="true"

    PagerStyle -> AlwaysVisible="false"

    By having AlwaysVisible set to false, it will show the pager only when the grid has more than 1 page to show.

    Hope it helps.
    Jose Guay
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Big B
    Big B avatar
    7 posts
    Member since:
    Jul 2009

    Posted 29 Jul 2009 Link to this post

    Thank you!

    I've got a different scenario now.
    The grid has 4 pages but I want to show only first one with no pager available.
  5. Jose
    Jose avatar
    49 posts
    Member since:
    Aug 2008

    Posted 29 Jul 2009 Link to this post

    Hi Vasyl.

    I think you can set the PagerStyle -> Visisble="false" and that will do the trick.

    Remember to keep AllowPaging="true" and PagerStyle -> AlwaysVisible="false".

    Let me know if that works.

    Best regards.
    Jose Guay
  6. Big B
    Big B avatar
    7 posts
    Member since:
    Jul 2009

    Posted 29 Jul 2009 Link to this post

    I was supposed to elaborate a little bit more...

    The same grid displays data obtained from a web service in asynchronous manner.
    Sometimes the grid outputs grouped data, sometimes just rows with regular info.

    There is a parameter available on the client-side that tells us what kind of output will be rendered.
    ...and no matter how many pages we get - pager should be made visible/hidden.
  7. Jose
    Jose avatar
    49 posts
    Member since:
    Aug 2008

    Posted 29 Jul 2009 Link to this post

    Hi Vasyl.

    You can use the following client side functions to implement grouping:

    groupColumn
    ungroupColumn

    Unfortunately there are no methods to show/hide the pager, however, there might be something you could do with the following functions and methods:

    page
    set_pageSize()

    I hope this will help you.

    Jose Guay






Back to Top
UI for ASP.NET Ajax is Ready for VS 2017