AUTHOR: Marin Bratanov
DATE POSTED: May 22, 2018
Combine a spell check button with the save button so the user can click Save and go through a spell check. For example, you may want your user to always fix spelling mistakes in a RadEditor before submitting their content.
The simplest solution is to use the SpellCheckValidator control that informs the user they need to perform a spellcheck:
Alternatively, you can:
<asp:Button Text=
"save"
OnClientClick=
"checkMe(); return false;"
ID=
"Button1"
OnClick=
"Button1_Click"
runat=
"server"
/>
<telerik:RadEditor runat=
"re1"
RenderMode=
"Lightweight"
>
<Content>miztake</Content>
</telerik:RadEditor>
<telerik:RadSpell runat=
"rs1"
IsClientID=
"true"
ButtonType=
"None"
OnClientCheckFinished=
"OnClientCheckFinished"
<script>
function
checkMe() {
$find(
"<%=rs1.ClientID%>"
).startSpellCheck();
}
OnClientCheckFinished() {
__doPostBack(
"<%=Button1.UniqueID%>"
,
""
);
</script>
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
rs1.ControlToCheck = re1.ClientID;
Button1_Click(
Response.Write(
"processed"
+ re1.Content);
A third option is to do this purely on the client as shown in the Invoke Separate Spell Check for each Textbox and Submit the Form on Success KB article.
Resources Buy Try