-
20 Sep 2007 5:48 PM #1
tab through grid possible
tab through grid possible
I'm new, so apologies if I've missed this:
Is there currently a way to tab through an editable grid? For example when you use something like "excel" you can hit return or hit tab to advance through the fields to the next location.
I realize this can be set up in forms, but I had not seen this feature in an editable grid yet.
Thanks.
-
20 Sep 2007 8:37 PM #2
I'm using an editable grid, and that behavior is there as default for me. I haven't specified anything fancy in the config so I would have to assume that it's all built into it. The way that mine works is a 'tab' will take you to the next editable field, and 'enter' will store that edit and stop editing.
Is there anything special that you're doing with your grid that might interfere with this?'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
-
21 Sep 2007 4:09 PM #3
If I go to the example grid here (http://extjs.com/deploy/ext/docs/index.html) I'm able to advance to each grid by tabbing, but to edit the grid I need to double click.
Does yours work differently than that?
-
23 Sep 2007 2:08 PM #4
In the example of inline editing in the current version docs, tabbing through the fields sets each one in turn to edit , so I'm not sure what you're doing there.
The only thing that springs to mind is this... Are you hitting 'Tab' or 'Enter' to close the editing in each cell? If you're editing a cell and press 'Tab' it tabs to the next field and opens the editor for that field. If you hit 'Enter' it closes the editor and you can tab to the next field, but because the editor was closed, the next one is also closed, meaning that you'd have to double-click again to open the editor. Is that what you're doing, or is there something else happening there?'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
-
23 Sep 2007 5:53 PM #5
Thanks for your explanation. If I go here:
http://extjs.com/deploy/ext/examples...edit-grid.html
in order to activate the editor the first time I can't just start with tabs, it looks like I need to double click. Once I do that, yes, like you say I can just tab advance. Thanks for clearing that up.
I guess I was expecting to be able to by default have the editor turned on or have a grid selected by default and ready for editing without having to double click. I thought I came across another example where this was the case, I did not need to double click to start the editor.
This behavior is in Firefox 2.0.0.7 if it matters.
-
23 Sep 2007 7:56 PM #6
One thing that you can do is start an editor off by default. It's something like...
I haven't had to use this before, but that's the basic idea. Get the Grid's ColumnModel, then the Editor for the cell from there, and tell it to start editing. It might need something a bit different to that, but hopefully it's a starting point for you.Code:grid.getColumnModel().getCellEditor(colIndex, rowIndex).startEdit ();
'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder


Reply With Quote