Is there any way to limit the number of lines (not character length) in a textbox?
2 Answers, 1 is accepted
answered on 19 Dec 2008, 08:37 PM
I am not sure what do you mean by "number of lines" - is it the number of carriage returns (created by pressing the Enter key) or the number of places where the input string splits to a new line? I am not aware of a way to count the second number, however, I can research this if needed.
var newLines = 0;
for (var j = 0; j < textboxvalue.length; j++)
if (textboxvalue.charCodeAt(j) == 10)
All the best,
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.