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

Standardize the customization of the Grid Pager Item

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ullas
Top achievements
Rank 1
Ullas asked on 06 Jul 2011, 04:50 AM
Hi,
I am trying to localize the contents of the Grid Pager and this is the code i have in the Item Data Bound event handler

if (e.Item is GridPagerItem) //set the appropriate values in the Pager drop down
{
                    GridPagerItem gridPagerItem= e.Item as GridPagerItem;
  
                    Label pageSizeLabel = gridPagerItem.FindControl("ChangePageSizeLabel") as Label;
                    if (null != pageSizeLabel)
                        pageSizeLabel.Text = "Number of Items:";
  
                    GridUsersList.PagerStyle.PagerTextFormat = "{4}{5} " + "items in " + "{1}" + " pages";
                    GridUsersList.PagerStyle.NextPageToolTip = "Next Page";
                    GridUsersList.PagerStyle.PrevPageToolTip = "Previous Page";
                    GridUsersList.PagerStyle.LastPageToolTip = "Last Page";
                    GridUsersList.PagerStyle.FirstPageToolTip = "First Page";
}

This works fine, but i have over 20 grids in different web pages in my application. Is there any way to standardize this instead of making this change in 20 different places?

Ullas

1 Answer, 1 is accepted

Sort by
0
Accepted
Mira
Telerik team
answered on 08 Jul 2011, 01:28 PM
Hello Ullas,

In order to localize the RadGrid with minimum efforts, I recommend that you use global resources.

I hope this helps.

Regards,
Mira
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Ullas
Top achievements
Rank 1
Answers by
Mira
Telerik team
Share this question
or