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

Hide Undo Button on RadSpell Dialog

2 Answers 48 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Sean Severson
Top achievements
Rank 1
Sean Severson asked on 02 Aug 2012, 05:16 PM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Aug 2012, 05:23 AM
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.
0
Sean Severson
Top achievements
Rank 1
answered on 03 Aug 2012, 02:24 PM
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
Tags
Spell
Asked by
Sean Severson
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Sean Severson
Top achievements
Rank 1
Share this question
or