PDA

View Full Version : On Arrow Keys And CellSelectionModel



herrjj
8 Apr 2008, 8:04 AM
Hi,

It would be great if my editable grid would respond to keydown events for the left & right (and possibly up & down) arrow keys.

I found this interesting thread which discusses setting the grid selection model to CellSelectionModel: http://extjs.com/forum/showthread.php?t=23186

It seems to have worked well for the poster but I am not having luck with it. Do I have to code my own handlers for these keydown events? Should CellSelectionModel handle it?

Thanks!




var grid = new Ext.grid.EditorGridPanel({
store: store,
cm: cm,
autoExpandColumn: 'foo',
height: 600,
autoScroll:true,
stripeRows:true,
frame:true,
clicksToEdit:1,
enableColumnMove:false,
selModel: new Ext.grid.CellSelectionModel(),
loadMask : {msg: 'Loading Data...', msgCls: 'ext-el-mask-msg'}
});

herrjj
8 Apr 2008, 12:00 PM
This was an ID10T error on my part. I was confused with what the actual behavior of arrow keys is as compared with my expectation. It works as described.