the RadEditor is inside a AjaxUpdatedControl, I have the MaxTextLenght set and when it is exceeded, the message appears (the added text exceeded...), after the ajax loading panel appears but it gets stuck in an infinite loopthere. How can I stop this.
Thanks
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 31 Oct 2011, 03:29 PM
Hi Michel,
We are aware of this issue, but there is not a solution for this scenario.
Nevertheless, you can write your own validation mechanism similar to the following one:
Here is an example formultiple editors on the page:
<asp:CustomValidator runat="server"ID="CustomValidator1"ControlToValidate="RadEditor1"ClientValidationFunction="checkLength">* The text length should not exceed 50 symbols.</asp:CustomValidator>
<script type="text/javascript">
varlimitNum = 50;
functioncheckLength(sender, args)
{
//Note that sender is NOT the RadEditor. sender is the <span> of the validator.
//The content is contained in the args.Value variable
vareditorText = args.Value;
args.IsValid = editorText.length > limitNum;
}
</script>
Best wishes,
Rumen
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