Author Topic: keyDown event won't fire  (Read 4276 times)

forwheeler

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
keyDown event won't fire
« on: December 13, 2013, 12:57:09 am »
I am trying to  create an event for the keyDown so I can add a new row to the grid. I know I can so this for pqgridcelleditkeydown in edit mode but I don't  want the user to have to double click on the last row cell to get to edit mode and then arrow down to add a new row. I want them to just arrow down on the last row.
I can't get it to fire for either type spelling pqgridkeydown or pqgrikeydown.
« Last Edit: December 13, 2013, 02:22:15 am by forwheeler »

forwheeler

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: keyDown event won't fire
« Reply #1 on: December 13, 2013, 04:37:36 am »
To make the cellKeyDown event fire, I needed to set this property.
            selectionModel:{type:'cell', mode:'block'},

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: keyDown event won't fire
« Reply #2 on: December 13, 2013, 07:21:41 pm »
selectionModel: {type: 'cell' } is required for cellKeyDown

mode can be 'single', 'range' or 'block'