Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2045
How to catch Enter key
posted

I want to save data entered when user hit Enter key. If I use TextChanged or ValueChanged it fired after every key.

I have KetPress event and client function:

function Editor_KeyPress(sender, e) {

//Gets the code of the key that is raising the event
var keyCode = e.get_keyCode();

alert(keyCode);

}

It does not fire on enter key.

Parents
No Data
Reply
  • 9190
    Offline posted

    Hi Arkgroup,

    Thank you for posting on our forums.

    By default, the KeyPress and ValueChanged client-side event should fire once you change the value of the WebTextEditor. The TextChanged client-side event fires when text in editor was changed on client and its value after postback became different from value before postback. For this reason, I don't believe the TextChanged event will fire when e.g. the 't' key is pressed. Moreover, I would like to mention that the enter key may not first the KeyPress event if the AutoPostBackFlags for EnterKeyDown is set to true (this causes a postback to occur).

    To ensure I can debug the behavior you're encountering, and to provide you with the correct solution, please update this thread with the build for the Infragistics assemblies you're referencing.

    I am looking forward to your update.

Children