This is a migrated thread and some comments may be shown as answers.

Access to Pager on Client-Side

5 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Big B
Top achievements
Rank 1
Big B asked on 29 Jul 2009, 06:27 PM
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!


5 Answers, 1 is accepted

Sort by
0
Jose
Top achievements
Rank 2
answered on 29 Jul 2009, 07:07 PM
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
0
Big B
Top achievements
Rank 1
answered on 29 Jul 2009, 07:27 PM
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.
0
Jose
Top achievements
Rank 2
answered on 29 Jul 2009, 07:38 PM
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
0
Big B
Top achievements
Rank 1
answered on 29 Jul 2009, 08:02 PM
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.
0
Jose
Top achievements
Rank 2
answered on 29 Jul 2009, 09:29 PM
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






Tags
Grid
Asked by
Big B
Top achievements
Rank 1
Answers by
Jose
Top achievements
Rank 2
Big B
Top achievements
Rank 1
Share this question
or