Showing and hiding the RadEditor control dynamically

2 posts, 0 answers
  1. RJ
    RJ avatar
    386 posts
    Member since:
    Oct 2006

    Posted 03 Sep 2015 Link to this post

    Hi All,

    I've implemented this code from Docs and Api reference but the toolbar is no longer showing when I change the position of div when shown.

    Any Help?

    Thanks in advance!

    <div id="wrapper" style="display:none;">
        <telerik:RadEditor ID="RadEditor1" runat="server">
        </telerik:RadEditor>
    </div>
     
    <telerik:RadButton runat="server" ID="RadButton1" Text="Toggle Visibility"
        OnClientClicked="OnClientClicked" AutoPostBack="false">
    </telerik:RadButton>
     
    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            var editor = $find("<%= RadEditor1.ClientID %>");
            var wrapper = $get("wrapper");
            var isEditorVisible = editor.isVisible();
     
            if (isEditorVisible) {
                $telerik.$(wrapper).hide(); // jQuery approach
                //wrapper.style.display = "none"; // JS approach
            } else {
               $(wrapper).attr("style", "LEFT: 300px; WIDTH: 400px; HEIGHT: 500px;  POSITION: absolute; TOP: 62px; z-index: 210");
                //Code added to set position when shown
                $telerik.$(wrapper).show(); // jQuery approach
                //wrapper.style.display = ""; // JS approach
     
                editor.repaint();
            }
        }
    </script>

  2. RJ
    RJ avatar
    386 posts
    Member since:
    Oct 2006

    Posted 19 Sep 2015 in reply to RJ Link to this post

    Nevermind guys
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top