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
3790
the browsers keypress is not being caught untill 5th digit?
posted

This is very od, ill explain it the best I can.

I'm watching for keypress events. See below of strange results.

1) if I press a key on the stage event Triggers

1) if I press a key on a grid event Triggers

1) if I'm in edit mode on a grid only the 5th key press ( letter or number ) fires the browser keypress event.

 a) double click to edit a cell

 b) press the letter a ( not event fires )

 c) press the letter b ( not event fires )

 d) press the letter c ( not event fires )

 e) press the letter d ( not event fires )

 f) press the letter e ( event fires )

Any ideas? I need my even to fire after any keypress.

Parents
  • 23953
    Offline posted

    Hello Sean, 

    If you want to handle the keypress while in edit mode the best way to do it is to hook to the igEditor.keypress event. While in edit mode the grid displays igEditors for each cell. Here is an example code on how to hook to the keypress event of igEditor for column "Name":

    Code Snippet
    1. features: [
    2.     {
    3.         name: 'Updating',
    4.         editMode: 'cell',
    5.         columnSettings: [
    6.             {
    7.                 columnKey: "Name",
    8.                 editorOptions: {
    9.                     keypress: function (evt, ui) {
    10.                         var ch = String.fromCharCode(ui.key);
    11.                         console.log("keyPress: " + ch);
    12.                     }
    13.                 }
    14.             }
    15.         ]
    16.     }]

    Best regards,
    Martin Pavlov
    Infragistics, Inc. 

Reply Children
No Data