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

[Solved] NumericPages & PagerTextFormat

3 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MAXX
Top achievements
Rank 1
MAXX asked on 10 Jun 2009, 03:18 PM
I am aware this is not the first thread about this subject, still the other ones didn't solve my problem and the posts have been "out of date"...
Also, the manual doesn't gimme a hint what I am doing wrong...

However, I simply try to modify/translate the PagerTextFormat of a grid in a NumericPages mode. All I get is the "standard" text, and no, that doesn't help me in any way. Everything works as expected, except the PagertextFormat.
Maybe someone can point me into the right direction, cheers in advance.

sample ascx:
<telerik:RadGrid ID="RadGridSearchResult" runat="server" 
  OnNeedDataSource="RadGridSearchResult_NeedDataSource" AllowPaging="True" 
  PageSize="5" GridLines="None" AutoGenerateColumns="False" > 
    <MasterTableView> 
      <NoRecordsTemplate>No record was found!</NoRecordsTemplate> 
         <Columns> 
            . 
            . 
            . 
         </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 

sample.ascx.cs
            RadGridSearchResult.MasterTableView.NoRecordsTemplate = new namicsNoRecordsTemplate(GetGlobalResourceObject("NATITitles""NATIPSNoRecordsMessage").ToString()); 
            RadGridSearchResult.MasterTableView.PagerStyle.Mode = GridPagerMode.NumericPages; 
            RadGridSearchResult.MasterTableView.PagerStyle.Position = GridPagerPosition.TopAndBottom; 
            RadGridSearchResult.MasterTableView.PagerStyle.PageButtonCount = 5; 
            RadGridSearchResult.MasterTableView.PagerStyle.NextPagesToolTip = GetGlobalResourceObject("NATITitles""NATIPSPagerStyleNextPagesToolTip").ToString(); 
            RadGridSearchResult.MasterTableView.PagerStyle.PrevPagesToolTip = GetGlobalResourceObject("NATITitles""NATIPSPagerStylePrevPagesToolTip").ToString(); 
            RadGridSearchResult.PagerStyle.PagerTextFormat = "Seite {0} von {1}, Person {2} von {3} von gesamt {5}."
 

3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 10 Jun 2009, 04:09 PM
Hi Frank,

Please note that  {0}, {1}, {2}, {3} and {4} parameters are mandatory when setting PagerTextFormat property. 
For more information about how to use this property, please refer to this help article.

Greetings,
Pavlina
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
MAXX
Top achievements
Rank 1
answered on 11 Jun 2009, 06:25 AM
Hi Pavlina

thanks for the quick response.
Even if I set all the mandatory parameters, it won't change anything at the end.
Whatever I write in the PagerTextFormat, will be overwritten by the standard format!

RadGridSearchResult.PagerStyle.PagerTextFormat = "{4} Seite {0} von {1}, Person {2} von {3} von gesamt {5}."
The result is still:
Page 1 of 28, items 1 to 5 of 137.

Sorry, but your help article doesn't really solves the problem. It just indicates, what I want to do, should be possible ;-)

0
Pavlina
Telerik team
answered on 11 Jun 2009, 04:41 PM
Hello Frank,

I followed your scenario in order to replicate the issue but to no avail.
Please find attached a simple runnable application that demonstrates the needed approach. Give it a try and let me know if you have other questions or problems.

All the best,
Pavlina
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.
Tags
Grid
Asked by
MAXX
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
MAXX
Top achievements
Rank 1
Share this question
or