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

How to localize PageSize in Pager in Codebehind?

2 Answers 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jgill
Top achievements
Rank 1
jgill asked on 15 Nov 2009, 01:05 AM
Hello,
I have a NextPrevAndNumeric pager in a grid and I wanted to localize the text for the label that says "Page size:", but I cannot seem to find out how to do this.

Is it in PagerStyle?  Somewhere else?  Does this have to be done using a FindControl of the label on the ItemCreated event (I am already creating the grid programatically on Page_Init).

dqAnswer.PagerStyle.PrevPageToolTip 
dqAnswer.PagerStyle.NextPageToolTip 
dqAnswer.PagerStyle.PagerTextFormat 


2 Answers, 1 is accepted

Sort by
0
Gilberto
Top achievements
Rank 1
answered on 15 Nov 2009, 01:28 AM
Just add tihs to RadGrid_ItemDataBound

    if (e.Item is GridPagerItem)
            {
                Label lblPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
                lblPageSize.Text = "Custom Page size";
            }

Gilberto
0
Princy
Top achievements
Rank 2
answered on 16 Nov 2009, 05:36 AM
Hi jgill,

You can also refer to the following help document  which explains more on customizing the properties of the buttons or labels inside the pager row:
Accessing the elements of advanced type pager

Thanks
Princy.
Tags
Grid
Asked by
jgill
Top achievements
Rank 1
Answers by
Gilberto
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or