event "onclienttextchange" does not fire on delete

2 posts, 0 answers
  1. Jason Parrish
    Jason Parrish avatar
    91 posts
    Member since:
    Sep 2009

    Posted 26 Feb 2010 Link to this post

    If a user deletes (either with the delete key or backspacing) the custom text, the event "onclienttextchange" does not fire.  Is this by design?
  2. Veronica
    Veronica avatar
    1213 posts

    Posted 01 Mar 2010 Link to this post

    Hi Jason Parrish,

    Yes. You are right that backspacing does not fire OnClientTextChange event. To catch when backspace is pressed you may use OnClientKeyPressing event for example:

    <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientTextChange="OnClientTextChange"
                OnClientKeyPressing="HandleKeyPress" AllowCustomText="true">

    In the Javascript function below 8 is the ASCII code of the Backspace button.

    1.function HandleKeyPress(sender, eventArgs) {
    2.           if (eventArgs.get_domEvent().keyCode == 8) {
    3.               alert("Backspace is pressed");
    4.           }
    5.       }

    I've attached the full code as a .zip file.

    If you have more questions, please let me know.

    Sincerely yours,
    Veronica Milcheva
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top