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

[Solved] How can I change PagerText in NextPrevAndNumeric mode?

4 Answers 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex R.
Top achievements
Rank 1
Alex R. asked on 09 Jul 2009, 04:23 PM
Hello.

How can I programatically change PegerText in "NextPrevAndNumeric" mode?
I know I should use PagerTextFormat property.
But the nothing is happaned when I change it.
For example I want to change text "91 items in 19 pages" on "91 #items in# 19 #pages#  "
See link http://www.telerik.com/help/aspnet-ajax/grdpageritem.html

Thank you.

4 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Jul 2009, 12:08 PM
Hello Alex,

I tried your approach and changed the PagerTextFormat property and it worked as expected.
Please take a look in the attached project for a working sample of this feature.
If you need more information in setting this property please take a look at the following link:
Using PagerTextFormat

We will be happy to hear from you if you need further assistance.

Best wishes,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alex R.
Top achievements
Rank 1
answered on 14 Jul 2009, 08:29 AM
Hello Martin,

I have analyzed you approach, and after made some changes.
I need to chage PagerTextFormat dynamically in *.cs  file.
So I transfared it to the *.cs file. 
I need this to implement my custom muiltylingual approach.
For example when user select english language the pager will be display "91 items in 19 pages",
when user select russian language the pager will be display another information.
After that all works correct.

But there is the second condition, pager should be on the top position. I use "Position" property .
<
PagerStyle Position ="Top" AlwaysVisible="true" >

 

</PagerStyle>

 


In this case the RadGrid control loads default PagerTemplateText. :-(
Could you help me resolve this problem ?
Thanks.

Alex. 





 

0
Princy
Top achievements
Rank 2
answered on 14 Jul 2009, 09:28 AM
Hello Alex,

On the language change event, you can call the rebind method of the grid after setting the required text format:
c#:
 RadGrid1.PagerStyle.PagerTextFormat = "{4} Пункты с {2} по {3} из {5}"
 RadGrid1.Rebind(); 

Thanks
Princy.
0
Alex R.
Top achievements
Rank 1
answered on 16 Jul 2009, 07:26 AM
Hi.
Thanks.
Alex.
Tags
Grid
Asked by
Alex R.
Top achievements
Rank 1
Answers by
Martin
Telerik team
Alex R.
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or