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

Disable(Gray Out) Recurrence editor

3 Answers 94 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Prasanna
Top achievements
Rank 1
Prasanna asked on 26 Nov 2012, 07:42 AM
Hi,
    I want to disable the recurrence editor its works fine in IE but in Firefox recurrence editor is not disable.
Code:
              i)       var elem = document.getElementById("divRecRule").getElementsByTagName("*");
                        for (var i = 0; i < elem.length; i++) {
                            elem[i].setAttribute('disabled', true);                        
                        }
              ii)       var elem = document.getElementById("divRecRule").getElementsByTagName("*");
                        for (var i = 0; i < elem.length; i++) {
                            elem[i].disabled = true;
                        }
I tried this both.....
In IE,


In FireFox,


Thanks,
Prasanna

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 28 Nov 2012, 11:20 AM
Hi Prasanna,

 
I have tested the issue with a code based on the one you shared and it worked properly in all browsers:

<script type="text/javascript">
           function OnClientClicked() {
               var elem = document.getElementById("RadSchedulerRecurrenceEditor1").getElementsByTagName("*");
               for (var i = 0; i < elem.length; i++) {
                   elem[i].setAttribute('disabled', true);
               }
           }
 
       </script>
       <div>
       <telerik:RadButton runat="server" ID="RadButton1" AutoPostBack="false" OnClientClicked="OnClientClicked"></telerik:RadButton>
       <telerik:RadSchedulerRecurrenceEditor runat="server" ID="RadSchedulerRecurrenceEditor1" >
       </telerik:RadSchedulerRecurrenceEditor>

Here is the video of my test. Please review it and let me know if you have further question.

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
Prasanna
Top achievements
Rank 1
answered on 28 Nov 2012, 02:32 PM
I cannot find my recurrence editor by using document.getElementById().
Code:
 <telerik:RadSchedulerRecurrenceEditor runat="server" ID="rsreRecRule" Width="560px" />

document.getElementById("rsreRecRule");

Its return null.

0
Plamen
Telerik team
answered on 03 Dec 2012, 02:22 PM
Hi Prasanna,

 
In such cases we recommend inspecting your page with FireBug or some other developers tool and check the real id or the control because in different scenarios the id can be generated differently.

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