Find the RadTextbox Length

2 posts, 0 answers
  1. Vvamc
    Vvamc avatar
    31 posts
    Member since:
    Jan 2014

    Posted 19 Jun 2014 Link to this post


    I have radtextbox I need to find the length of the characters  entered  on each entry of a letter in rad textbox ? I am not able to understand which client event to be fired as i have tried onKey press but none of the events are firing.Thanks in advance.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Jun 2014 in reply to Vvamc Link to this post

    Hi Vvamc,

    Try to use onkeyup event to count the number of entered character in the RadTextBox. This event will fire when the key is released. Please take a look into the below sample code snippet to achieve your scenario.

    <telerik:RadTextBox ID="rtxtCharacterLength" runat="server" onkeyup="return checkLength(this);">

    function checkLength(txt) {
        var txtLength;
        if (txt != null) {
            var txtLength;= txt.value.length

Back to Top