w2grid.keyboard

Indicates if grid should listen to keyboard.
Boolean, default = true
If .keyboard property is set to true, the grid will add event listener to listen for keyboard events. There are several keyboard keys linked to the grid actions:
  • Arrow up - previous record
  • Arrow down - next record
  • Arrow right - expand record
  • Arrow left - collapse record
  • Delete - trigger delete action
  • Ctl + a (Cmd + a on mac) - select all records
  • Enter or Space - enter editable field
This property can be defined during object creation: Or any time after the grid has been created: Internally, the feature is implemented by w2utils.keyboard object. If there more then one grid on the screen and all of them have .keyboard set to true, then the last grid where user selects a record will active keyboard listener.

User Comments

comments powered by Disqus