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

Numeric Paging with Text before paging number

6 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 30 Apr 2009, 09:59 AM
Hi,

I have the following line in my grid.                              
<PagerStyle Mode="NumericPages" Position="TopAndBottom" PagerTextFormat="Change page:{4} Display page {0} of {1}, items {2} to {3} of {5}." />

However, the text "Change page:" doesn't show on my grid.  Is there a way I can achieve that?  Or if there is anything I coded wrong?

Chris

6 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 30 Apr 2009, 04:22 PM
Hi Chris,

NumericPager have the format presented in the screenshot here. If you change the default value of the PagerTextFormat property, this part of it will be applied for the respective grid pager:

{4}  |  Page {0} of {1}, items {2} to {3} of {5}

For more information about how to use pager text format, refer to the following help topic.

Best wishes,

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
Chris
Top achievements
Rank 1
answered on 01 May 2009, 05:27 AM
Hi,

Like I mentioned from my first post, I would like to have the "numeric paging"(Mode="NumericPages") to show
"Change page: {4} Display page {0} of {1}, items {2} to {3} of {5}."

The default NumericPages mode doesn't show.  Therefore i tried to use PagertextFormat property.  However, using PagerTextFormat doesn't work to show the text "Change page:" before {4}.  The output of the grid still shows like the following
"{4} Display page {0} of {1}, items {2} to {3} of {5}."

I would like to know if there is any work around you can provide me to display the text "Change page".  Please advise.

Chris
0
Pavlina
Telerik team
answered on 04 May 2009, 08:34 AM
Hello Chris,

After Q1 2009 there is a new default pager and improved existing pager types - Next/Previous, NumericPages, NextPreviousAndNumeric (default), Advanced, NextPreviousNumericAndAdvanced, Slider. See the Paging section on the online demos for details.
Basic Paging

Additionally, you can set the format from the old pager only for the text when Mode is "NextPrev" using the PagerTextFormat property.
The rest of the grid pagers (NumericPager, NextPrevAndNumeric, Advanced, NextPrevNumericAndAdvanced and Slider) have default format without "Change page:"  text.

More information is available in the following links:
What's new
Using PagerTextFormat

Best regards,
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
Chris
Top achievements
Rank 1
answered on 04 May 2009, 09:05 AM

Hi Pavlina,

 

I totally understood the new version and this is what i am using now.  And i read thru all sample and documentation.  I also learnt that with using the NumericPaging mode, it doesn't allow me to show text "Change page" before the paging number.  However, this is what exactly I want to achieve which is to show "Change page" before the paging number.  I am asking if you guys have any work around

I think my question is fairly simple and I have been typing the same thing 3 times already.  I don't know what confuse you about my question and what I want to do.  If you still don't know what I want to do, please let me know and I will create a ticket and show you the screenshot visually. 

Chris

0
Princy
Top achievements
Rank 1
answered on 04 May 2009, 09:54 AM
Hello Chris,

A suggestion is to add a label with the desired text and add it to the control collection of the panel in the pager row:

c#:
protected void RadGrid1_ItemDataBound (object sender, GridItemEventArgs e) 
   {         
      if (e.Item is GridPagerItem) 
        { 
            GridPagerItem pager = (GridPagerItem)e.Item; 
            Label lbl = new Label(); 
            lbl.Text = "Change Page : " + "&nbsp;";  
            pager.Controls[0].Controls[0].Controls[0].Controls[0].Controls[0].Controls.AddAt(0,lbl); 
        } 
   } 

Thanks
Princy.
0
Chris
Top achievements
Rank 1
answered on 04 May 2009, 10:01 AM
Thanks! Princy
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Chris
Top achievements
Rank 1
Princy
Top achievements
Rank 1
Share this question
or