Disable(Gray Out) Recurrence editor

4 posts, 0 answers
  1. Prasanna
    Prasanna avatar
    47 posts
    Member since:
    Oct 2012

    Posted 26 Nov 2012 Link to this post

    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
  2. Plamen
    Admin
    Plamen avatar
    2954 posts

    Posted 28 Nov 2012 Link to this post

    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.
  3. Prasanna
    Prasanna avatar
    47 posts
    Member since:
    Oct 2012

    Posted 28 Nov 2012 Link to this post

    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.

  4. Plamen
    Admin
    Plamen avatar
    2954 posts

    Posted 03 Dec 2012 Link to this post

    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.
Back to Top