Hide Undo Button on RadSpell Dialog

3 posts, 0 answers
  1. Sean Severson
    Sean Severson avatar
    56 posts
    Member since:
    Aug 2009

    Posted 02 Aug 2012 Link to this post

    How can I hide the Undo button on the RadSpell dialog box?  My client does not want users to be able to undo.

    Thanks,

    Sean M. Severson
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Aug 2012 Link to this post

    Hello,

    Try the following code snippet to hide the Undo Button inside the RadSpell dialog.

    ASPX:
    <telerik:RadTextBox ID="RadTextBox1" runat="server"  Text="mispleng" TextMode="MultiLine">
    </telerik:RadTextBox>
    <telerik:RadSpell ID="RadSpell" runat="server" ControlToCheck="RadTextBox1" OnClientCheckStarted="OnClientCheckStarted" />

    JS:
    <script type="text/javascript">
        function OnClientCheckStarted(spell) {
            setTimeout(function () {
                var UndoButton = spell._dialogOpener._dialogContainers.SpellCheckDialog.get_contentFrame().contentWindow.document.getElementById("dialogControl_Undo");
                UndoButton.parentNode.style.display = "none";
            }, 350);
        }
    </script>

    Hope this helps.

    Regards,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sean Severson
    Sean Severson avatar
    56 posts
    Member since:
    Aug 2009

    Posted 03 Aug 2012 Link to this post

    Princy,

    I appreciate the help.  The script you provided works well, but not on the very first time the spell check dialog is displayed.  On the very first spell check on the page, the UndoButton variable in the javascript function is nothing.

    Sean M. Severson
Back to Top