-
2 Jun 2010 4:21 AM #1
Sorting EditorGrid problem
Sorting EditorGrid problem
I'm dealing with an EditorGrid with its ColumnConfigs and his store.
After the grid's been filled, a sorting is applied with the line:
An add button adds a new empty register to the grid's store and an empty row is displayed in the top of the list (because of the SortDir.ASC parameter). I fill the fields of the new row, everything fine.Code:grid.getStore().sort(field, sortDir);
Second add, second empty row in the top of the list. From this moment if I click over any editable field of the grid, an editor appears in the cell to change its value, as expected, but, and here is the reason of my question, the content loaded into the editor is the text of the row below.
Example:
Code Description
--------------------
(last added row)
AAA aaa
BBB bbb
On clicking the Code cell of the row with AAA, appears the editor with BBB inside.
I've realized that this strange behaviour doesn't appear if the grid is not sorted.
Also say that in other grids, I override the preProcess() and postProcess() functions to work with this value before and after the editor's action. but NOT in this case. I add the editor in this simple way:
Is this a bug or am I forgetting something?Code:TextField<String> textFieldCode = new TextField<String>(); columnConfigCode.setEditor(new CellEditor(textFieldCode));
Thanks in advance.
-
2 Jun 2010 5:17 AM #2
How can we know this if you have not posted a testcase that implements EntryPoint yet.am I forgetting something?
-
2 Jun 2010 7:28 AM #3
Sorry if I'm too novice using GXT, but I'm not sure about what you ask for.
The application in which I'm working is quite huge and I'm dealing with a single panel, I can't copy here all the code.
Anyway I thought there could be a concept mistake in my development or maybe a known bug.
How can I expose enough details?
-
2 Jun 2010 7:29 AM #4
Reproduce it in a simple alone standing example that implements EntryPoint.How can I expose enough details?
-
3 Jun 2010 3:39 AM #5
Partially solved.
I know it may not be the best way to do it, but forcing the ordenation of the grid after adding a new row, the problem dissappears.
This code is placed in the function executed after the event of adding a row.Code:String sortField = grid.getStore().getSortField(); SortDir sortDir = grid.getStore().getSortDir(); grid.getStore().sort(sortField, sortDir);
Similar Threads
-
Sorting a numerical column from editorGrid not working
By Adam W in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 11 Mar 2009, 10:09 AM -
EditorGrid sorting of special characters
By alt_004 in forum Ext GWT: Help & Discussion (1.x)Replies: 0Last Post: 3 Mar 2009, 10:41 PM -
Grid sorting problem
By Scotch in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 4 Sep 2008, 5:20 AM -
[Ext2.0a1] Edit not working in EditorGrid after sorting
By spacyspacy in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 1 Oct 2007, 5:51 AM -
editorGrid + comboBox = bad sorting
By HeathT in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 20 Aug 2007, 3:44 PM


Reply With Quote