How to localize PageSize in Pager in Codebehind?

3 posts, 0 answers
  1. jgill
    jgill avatar
    116 posts
    Member since:
    Jul 2005

    Posted 14 Nov 2009 Link to this post

    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. Gilberto
    Gilberto avatar
    65 posts
    Member since:
    Sep 2006

    Posted 14 Nov 2009 Link to this post

    Just add tihs to RadGrid_ItemDataBound

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

    Gilberto
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Nov 2009 Link to this post

    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.
Back to Top