Footer customization

4 posts, 1 answers
  1. Leonardo
    Leonardo avatar
    7 posts
    Member since:
    Apr 2009

    Posted 24 Apr 2009 Link to this post

    I'm doing a rad grid and I'm using the footer with mode as Advanced.
    I need to globalize the text that appears in the footer advanced mode.
    Someone knows how can I change the text of it?

    Thanks.
  2. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 24 Apr 2009 Link to this post

    Hi,

    take a look at this post: http://www.telerik.com/community/forums/aspnet-ajax/grid/using-custom-pager-in-master-table-and-detail-table.aspx#795351

    Sebastian (in his answer) also provides a link (pager template) to the samples - which brought me to my final solution (I have to display the thing in multiple (>5) languages).

    Regards

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

    Posted 24 Apr 2009 Link to this post

    Hello Leonardo,

    You can set custom text for the pager Items using the following code and setting:
    1. To customize the text on the left side of your pager row
    c#:
    protected void RadGrid1_ItemDataBound (object sender, GridItemEventArgs e) 
        { 
           if (e.Item is GridPagerItem) 
            { 
               GridPagerItem pager = (GridPagerItem)e.Item; 
               Label lbl = (Label)pager.FindControl("ChangePageSizeLabel"); 
               lbl.Text = "CustomText1"
               Label lbl1 = (Label)pager.FindControl("GoToPageLabel"); 
               lbl1.Text = "CustomText2"
               Label lbl2 = (Label)pager.FindControl("PageOfLabel"); 
               lbl2.Text = "CustomText3"
               Button link1 = (Button)pager.FindControl("GoToPageLinkButton"); 
               link1.Text = "CustomText4"
               Button link2 = (Button)pager.FindControl("ChangePageSizeLinkButton"); 
               link2.Text = "CustomText5"
            } 
         } 

    2.To customize the text on the right side of your pager row, you would have to set the PagerTextFormat as shown below:
    aspx:
     <telerik:RadGrid ID="RadGrid1" AllowPaging="true" PageSize="5" DataSourceID="SqlDataSource1" OnItemDataBound="RadGrid1_ItemDataBound" runat="server">        
        <PagerStyle PagerTextFormat="CustomText {4}  Customtxt1 {0} Customtxt2 {1}, Customtxt3 {2} Customtxt4 {3} Customtxt5 {5}"  Mode="Advanced"/>         
         <MasterTableView> 
          ....  

    Thanks
    Princy.
  5. Leonardo
    Leonardo avatar
    7 posts
    Member since:
    Apr 2009

    Posted 27 Apr 2009 Link to this post

    Thanks Princy,

    The runtime code worked perfectly.
Back to Top