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

rsRecurrenceOptionList click event and selected item

3 Answers 67 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Fred
Top achievements
Rank 1
Fred asked on 11 Apr 2013, 09:44 PM
How can i capture the click event on client side whenever the rsRecurrenceOptionList is clicked?

I want to be able to capture the click and get the selected item to hide or show a custom panel with controls.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 16 Apr 2013, 11:05 AM
Hi Fred,

 
You can easily achieve it with the following code by using onClientFormCreated event of RadScheduler:

function OnClientFormCreated(sender, args) {
               var $ = $telerik.$;
               $(".rsRecurrenceOptionList ").on("click", function myfunction() {
                   alert(1);
               });
           }

Hope this will be helpful.

Kind regards,
Plamen
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
Fred
Top achievements
Rank 1
answered on 16 Apr 2013, 09:41 PM
Thanks for response.  I have the following scripts on the page

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";

});

var rruleControl = parent.document.getElementById("hdnRRule");

var rrule;

if (rruleControl != null) {

rrule = rruleControl.value;

if (!!rrule) {

var recurrenceEditorJQuery = $("[id$='RecurrencePatternEditor']");

var recurrenceEditor = $find(recurrenceEditorJQuery.attr("id"));

if (recurrenceEditor != null) {

recurrenceEditor.set_recurrenceRule(rrule);

}

}

}

}

function OnClientFormCreated(sender, eventArgs) {

$telerik.$(

".rsAdvRecurrenceRangePanel .rsAdvOptionsPanel ul li:first-child").hide();

$telerik.$(

".rsRecurrenceOptionList").on("click", function selecteditemclick() {

alert(1);

});

}


The alert does not fire.

I also have a second issue.  When i try to set the recurrence rule for the radschedulerrecurrenceeditor control using
recurrenceEditor.set_recurrenceRule(rrule);  I get an error "Microsoft JScript runtime error< Object doesn't support property or method 'get_pattern'  >

I have EnableEmbeddedScript = "true" so its using the embedded script in the Telerik.Web.UI

My current version of Telerik.Web.UI.dll is 2012.2.724.35

Is the embedded script for RecurrenceEditor.js or RecurrenceRule.js missing that method?  I think it's the latter, because the get_pattern is being called on the recurrence rule.

0
Plamen
Telerik team
answered on 18 Apr 2013, 03:36 PM
Hi Fred,

 
I have tested the scenario you described but could not observe any unusual behavior. I am attaching my test web page. Would you please review it and let us know if your scenario is somehow different so we could be more helpful?
 

Greetings,
Plamen
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
Fred
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Fred
Top achievements
Rank 1
Share this question
or