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

[Solved] Specified page size for grid more than number of recores

2 Answers 153 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 23 Dec 2009, 07:09 PM
Hi,
I am creating a radgrid, specifying the PageSize=20 and setting the PagerStyle Mode=NextPrevNumericAndAdvanced

 

 

Then, when I have less than 20 rows, no paging controls are displayed, that's fine.
But if I have 25 records it shows me the text box, where customer can specify desired page size. Ok.
If he specify here 30, nothing will change, page size will remain 20. Yes. if he sets page size to 25, all the records will be displayed and paging control disappears. I belive that should happed by default if he specify page size more than records in the grid.
Why it keeps the current page size instead of taking the max number of records as new value?
Am I missing some scenarios where it could be misleading?

Thank you,
Alex.

2 Answers, 1 is accepted

Sort by
0
kevin yang
Top achievements
Rank 1
answered on 23 Dec 2009, 07:18 PM
Hi,

I have similar but different question.  After setting the pagesize equal or greater than actual records. Paging control disappear. 
Is there a way to have the Paging control stay in this case so user can resize the pagesize back to smaller size anytime ?

Thanks
0
Princy
Top achievements
Rank 2
answered on 24 Dec 2009, 07:50 AM
Hi Kevin,

You can set the AlwaysVisible property of the PagerStyle to True to display the controls even after the user has changed the page size to a size equal or greater than actual records

 <PagerStyle AlwaysVisible="True" Mode="NextPrevNumericAndAdvanced" />

Thanks,
Princy
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
kevin yang
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or