I am trying to capture the keyCode on the KeyPress Event client side.If I use
function IgnoreEnter(keyCode) { if (event.keyCode == 13) { event.returnValue = false event.cancel = true return true } else { return false }}
it is not capturing the keycode event. I need to pass the event, which I am not sure how to do that. Using <ClientSideEvents KeyPress="IgnoreEnter" KeyDown= "IgnoreEnter"/> does not capture the event in Firefox. How do I capture the event?
Thanks.
Hi khoke,
Thank you for posting in the community.
From what I can see you want to cancel the postback upon clicking the Enter key while in edit mode. You should be able to do that by setting the HideEnterKey property to True and the EnterKeyDown postback flag to Off.
Note that with this setup the Enter key would also not trigger the KeyPress client side event.
Please let me know if this helps.
Best Regards,
Petar IvanovDeveloper Support EngineerInfragistics, Inc.http://es.infragistics.com/support
Please feel free to contact me if you need further assistance.
Hi
I dont want the user to edit in the text box at all so how can i do it i added client side event and am returning false event then its editing the value
YES!
Thank you so much!!!!!! It solved my problem!
Thanks!!!!