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

Recurrence Editor Issues

5 Answers 211 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nehal
Top achievements
Rank 1
Nehal asked on 03 May 2013, 05:36 AM
Hi, 

After i update my project with telerik new dll version 2012.3.1205.35, below code is not working which was working good before.

function pageLoad() {
                var $ = $telerik.$;
                $(".RecurrenceEditor").children().each(function (i) {
                    if (i == 0) {
                        $($($(this).children()[0]).children()[0]).attr("checked", "checked");
                    }
                    else if (i == 1) {
                        this.style.display = "block";
                    }
                });               
            }

Now I am getting Weekly as default checked option.I want to check all first option as it was before.
Please reply fast.

Nehal

5 Answers, 1 is accepted

Sort by
0
Nehal
Top achievements
Rank 1
answered on 03 May 2013, 09:38 AM
Hi,

One more problem.

For localization of RadSchedulerRecurrenceEditor i made RadSchedulerRecurrenceEditor.sv.resx and RadSchedulerRecurrenceEditor.resx file in App_GlobalResources folder in root directory of my web application.

I open this RadSchedulerRecurrenceEditor control on Radwindow which has so many other controls. When culture is sweden then RadSchedulerRecurrenceEditor has swedish resources but if i perform postback then it become in default language that is english.

Nehal

0
Boyan Dimitrov
Telerik team
answered on 07 May 2013, 02:14 PM
Hello Nehal,

Please find below a code snippet that will select the hourly option(the very first option in the list)  from the recurrence panel when user opens the recurrence panel. To achieve that behavior I have used the RadScheduler OnClientFormCreated client-side event. Here you may find a help article that shows a couple of examples how you can manipulate different elements within the advanced form using jQuery including the recurrence panel.
//JavaScript
function clientFormCreated(sender, args) {
    var $ = $telerik.$;
    var mode = args.get_mode();
    if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
        mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
 
        $(".rsRecurrenceOptionList li:eq(0) input").attr('checked', true);
    }
}

Could you please confirm that you have followed the steps described in this help article for localization of the RadScheduler control?
Additionally I would recommend setting explicitly on each page load the culture to Sweden as shown in the code snippet:
//code behind
protected void Page_Load(object sender, EventArgs e)
    {
        RadScheduler1.Culture = CultureInfo.CreateSpecificCulture("sv-SE");
    }

Regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Nehal
Top achievements
Rank 1
answered on 09 May 2013, 11:42 AM
Hi Boyan,

I am opening Recurrence as alone control in Radwindow so i don't have  OnClientFormCreated event of RadScheduler.

My requirements are:-(See attachment)
1.Recurrence must be checked default.
2."Hourly" and "No end date" option must be hide.
3.No option should be shown on right side.


For culture, I followed same steps then i can see some words are in sweden and some are in english.

Regards,
Nehal
0
Nehal
Top achievements
Rank 1
answered on 09 May 2013, 12:17 PM
Hi Boyan,

I could do complete my requirement by using below code.

function pageLoad() {
                var $ = $telerik.$;
                $(".RecurrenceEditor").children().each(function (i) {
                    if (i == 0) { $($($(this).children()[0]).children()[0]).attr("checked", "checked"); }
                    else if (i == 1) { this.style.display = "block"; }
                });
              
                    $(".rsRecurrenceOptionList li:eq(0) input").attr('checked', true);
                    $(".rsRecurrenceOptionList li:first-child").hide();
                    $(".rsAdvRecurrenceRangePanel li:eq(0)").hide();
                    var divweek = "#" + ("ctl00_cph1_rsReccEditor_RecurrencePatternWeeklyPanel");
    $(divweek).css("display", "none");   
                    var divhr = "#" + ("ctl00_cph1_rsReccEditor_RecurrencePatternHourlyPanel");
    $(divhr).css("display", "none");
            }

Still problem with sweden resource as shown in attachment.

Regards,
Nehal
0
Boyan Dimitrov
Telerik team
answered on 14 May 2013, 10:35 AM
Hello,

I would suggest reviewing the following help article that explains how you can edit the translation strings for the not translated elements such as: Hourly, Daily, Weekly, End after and etc. The help article shows an easy and convenient way of translate the string using the properties window of the visual studio environment. 

Hope that this will be helpful.

Kind regards,
Boyan Dimitrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
Nehal
Top achievements
Rank 1
Answers by
Nehal
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or