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

Footer customization

3 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Leonardo
Top achievements
Rank 1
Leonardo asked on 24 Apr 2009, 06:58 PM
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.

3 Answers, 1 is accepted

Sort by
0
ManniAT
Top achievements
Rank 2
answered on 24 Apr 2009, 07:04 PM
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
0
Accepted
Princy
Top achievements
Rank 2
answered on 25 Apr 2009, 04:29 AM
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.
0
Leonardo
Top achievements
Rank 1
answered on 27 Apr 2009, 12:22 PM
Thanks Princy,

The runtime code worked perfectly.
Tags
Grid
Asked by
Leonardo
Top achievements
Rank 1
Answers by
ManniAT
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Leonardo
Top achievements
Rank 1
Share this question
or