Problems with setting texts in RadMonthYearPicker

5 posts, 0 answers
  1. Jenny
    Jenny avatar
    1 posts
    Member since:
    Mar 2016

    Posted 25 Mar 2016 Link to this post

    I would like to use the RadMonthYearPicker Component in an application with Swedish language. I need two Controls for letting the users to define a period. But I have a problem with setting the texts on the Today and Cancel buttons.

    I've tried changing the settings in MonthYearNavigationSettings in the Page_Load, but just the first call for each Component makes an impact on the result.

    For example:

    rmypFromDatum.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";
    rmypFromDatum.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
    rmypTomDatum.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
    rmypTomDatum.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";

    then in the first Component, rmypFromDatum, the text on the Cancel Button is changed to "Avbryt", but the text on the Today button is English - Today. And vice versa - on the second Component the Today button has the text changed to "Idag" but the Cancel button has the text "Cancel.

    When a button is clicked on the page and the page is reloaded both the buttons - Today and Cancel - get the Swedish texts.

    What shall I do to make my Changes to be visible the first time the users open the Components. Please help!

    Best regards,





  2. Eyup
    Eyup avatar
    3918 posts

    Posted 30 Mar 2016 Link to this post

    Hello Jenny,

    Try to apply these localization settings in an earlier stage of the page life cycle. For example:
    protected void rmypFromDatum_Init(object sender, EventArgs e)
        RadMonthYearPicker picker = sender as RadMonthYearPicker;
        picker.MonthYearNavigationSettings.CancelButtonCaption = "Avbryt";
        picker.MonthYearNavigationSettings.TodayButtonCaption = "Idag";
        picker.MonthYearNavigationSettings.OkButtonCaption = "Godta";

    I hope this will prove helpful.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Boris
    Boris avatar
    2 posts
    Member since:
    Mar 2017

    Posted 16 Jan 2019 in reply to Eyup Link to this post

    Even this does not help. Only the 1st assigned text is applied, any further Caption Text assignment does not set the Text. So when I start to set picker.MonthYearNavigationSettings,CancelButtonCaption this is changing, but further captions (e.g. TodayButtonCaption) does not. Same in opposite order, changing the TodayButtonCaption at 1st, does the Change, but following CancelButtonCaption does not.
  4. Boris
    Boris avatar
    2 posts
    Member since:
    Mar 2017

    Posted 16 Jan 2019 in reply to Boris Link to this post

    Additional Info: 2018.2.516.45
  5. Eyup
    Eyup avatar
    3918 posts

    Posted 21 Jan 2019 Link to this post

    Hi Boris,

    Generally, you can achieve this requirement by using a resx globalization file as demonstrated in the following article:

    Alternatively, you can try setting the code-behind properties in a later stage of the page life cycle, for example Page_PreRender or PreRenderComplete.

    You can also set these captions on client-side:

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top