-
24 Feb 2010 2:48 AM #1
EditorGrid, changing column afterEdit
EditorGrid, changing column afterEdit
I will know, if it's possible, when I update a cell, afterEdit I will give the focus on another cell on the same row, but with a different Column.
Thx
-
24 Feb 2010 4:38 AM #2
Assuming you want to select/edit the 3rd column, try:
Code:grid.on('afteredit', function(e) { grid.startEditing(e.row, 2); // Alternatively, if you don't want to start editing immediately: // grid.getSelectionModel().select(e.row, 2); });
-
24 Feb 2010 7:55 AM #3
I don't really understand what you want to do?
-
24 Feb 2010 8:17 AM #4
I don't really understand what you want to do?
mmm, you asked how to focus another cell in afteredit.
will focus another cell.Code:grid.getSelectionModel().select(e.row, 2);
will focus another cell and start editing.Code:grid.startEditing(e.row, 2);
I don't think I can be any clearer.
-
24 Feb 2010 8:29 AM #5
Doesn't work!Code:grid.getSelectionModel().select(e.row, 2);
Because, select is not a function
-
24 Feb 2010 8:36 AM #6
It is if you are using the CellSelectionModel (with the EditorGridPanel) as I assumed given your query.select is not a function
-
24 Feb 2010 11:51 PM #7
In fact, I define my grid EditorPanel with that :
I can do this :Code:var listingEditorGrid = new Ext.grid.EditorGridPanel
But the row is no really the good one, if I push enter to validate my cell.Code:listingEditorGrid.on('afteredit', function(e){ listingEditorGrid.startEditing(3, 7); });
But this code doesn't work with that:
Because CellSelectionModel is no a function of listingEditorGridCode:listingEditorGrid.on('afteredit', function(e){ listingEditorGrid.CellSelectionModel().select(e.row, 1) });
-
25 Feb 2010 3:47 AM #8
If you read the documentation for Ext.grid.EditorGridPanel, you'll see that the selModel defaults to Ext.grid.CellSelectionModel if not otherwise specified. And, CellSelectionModel contains a select() method.
Your code:
is incorrect. It should be:Code:listingEditorGrid.CellSelectionModel().select(e.row, 1)
If this doesn't work, then post a short working showcase.Code:listingEditorGrid.getSelectionModel().select(e.row, 1);


Reply With Quote