PDA

View Full Version : About Editorgridpanel , how to make it act like excel



sunrong
8 Aug 2010, 6:38 PM
hi,
i use CellSelectionModel.
selModel: new Ext.grid.CellSelectionModel({singleSelect:true}),
use arrow key move to one cell, and inputting data must be after hitting 'enter' key.
howevel in excel, we can input data directly.
and in excel , it moves to the next cell after hitting 'enter' key. this function is desired.

how to make it?

thank.

Condor
8 Aug 2010, 10:28 PM
1. Typing to start editing is not supported and is going to be very hard to write yourself (you are not in the editor so you keystroke will need to be resend to the editor once it's visible).

2. CellSelectionModel is still missing the moveEditorOnEnter config option of RowSelectionModel. I've written a patch for CellSelectionModel to support this (you'll have to search - it's a rather old post).

sunrong
8 Aug 2010, 11:52 PM
Thanks Condor.
I find two posts of yours concerning moveEditorOnEnter.
1. http://www.sencha.com/forum/showthread.php?30779-Editorgrid-problem-with-selecting-next-cells-on-ENTER-press&highlight=moveEditorOnEnter
2. http://www.sencha.com/forum/showthread.php?30803-CellSelectionModel-moveEditorOnEdit
both of them is the same.
i tried it, key TAB is good, but ENTER seems not be overidden.
i use extjs 3.2.1.
thanks.
sun

Condor
9 Aug 2010, 12:13 AM
I meant this post (http://www.sencha.com/forum/showthread.php?30803-CellSelectionModel-moveEditorOnEdit) (but it probably needs an Ext 3.2.1 update).

sunrong
10 Aug 2010, 12:05 AM
It's difficult for me to update it.could you show me the code or other related posts i can refer to?


thanks.

sun

jackpan
24 Sep 2010, 4:54 AM
I meant this post (http://www.sencha.com/forum/showthread.php?30803-CellSelectionModel-moveEditorOnEdit) (but it probably needs an Ext 3.2.1 update).

I tried the change with 3.2.1, and found ed = g.activeEditor always returns null.. Can you update the sample for extjs3.2.1? Thanks!