NextPrevNumericAndAdvanced: Localization

3 posts, 0 answers
  1. Ellis
    Ellis avatar
    28 posts
    Member since:
    Jun 2007

    Posted 28 Apr 2009 Link to this post

    Hi, i follow some guides and forum posts, to translate the NextPrevNumericAndAdvanced pager, but i lost an information on how to translate a label.
    I do this:
    1 Protected Sub RadGrid1_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
    2         If TypeOf e.Item Is Telerik.Web.UI.GridPagerItem Then 
    3             Dim lblGoToPage As Label = DirectCast(e.Item.FindControl("GoToPageLabel"), Label) 
    4             If Not lblGoToPage Is Nothing Then lblGoToPage.Text = "Seleziona Pagina:" 
    5             Dim lbGoToPage As Button = DirectCast(e.Item.FindControl("GoToPageLinkButton"), Button) 
    6             If Not lbGoToPage Is Nothing Then lbGoToPage.Text = "Visualizza" 
    7             Dim lblPageSize As Label = DirectCast(e.Item.FindControl("ChangePageSizeLabel"), Label) 
    8             If Not lblPageSize Is Nothing Then lblPageSize.Text = "Comunicazioni per Pagina:" 
    9             Dim lbPageSize As Button = DirectCast(e.Item.FindControl("ChangePageSizeLinkButton"), Button) 
    10             If Not lbPageSize Is Nothing Then lbPageSize.Text = "Mostra" 
    11         End If 
    12     End Sub 

    In the example i translate "GoToPageLabel" and "ChangePageSizeLabel", but in the grid i have another label contains "of number of pages as number".
    How can i translate this label? what is its name?

    thank you

    Ellis
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Apr 2009 Link to this post

    Hello Ellis,

    You can try out the following code to change the text of the page of label:

    vb:
    Dim lblPageOf As Label = DirectCast(e.Item.FindControl("PageOfLabel"), Label) 
    lblPageOf.Text = "CustomText" 

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ellis
    Ellis avatar
    28 posts
    Member since:
    Jun 2007

    Posted 28 Apr 2009 Link to this post

    Hi Princy, i follow your example but i must change it.
    I do this:
    Dim lblPageOf As Label = DirectCast(e.Item.FindControl("PageOfLabel"), Label)
    lblPageOf.Text = lblPageOf.Text.Replace("of""di"

    I replace only "of", cause simple overwriting the text property of the label, i lost the number of pages.

    Thank you Princy

    Ellis
Back to Top