This is a migrated thread and some comments may be shown as answers.

event "onclienttextchange" does not fire on delete

1 Answer 80 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jason Parrish
Top achievements
Rank 1
Jason Parrish asked on 26 Feb 2010, 11:39 PM
If a user deletes (either with the delete key or backspacing) the custom text, the event "onclienttextchange" does not fire.  Is this by design?

1 Answer, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 01 Mar 2010, 12:14 PM
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.
Tags
ComboBox
Asked by
Jason Parrish
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Share this question
or