View Full Version : grid sorted with grouping shows WRONG selection
9 Dec 2011, 4:23 AM
i have a grid with grouping feature. i also use there 'rownumberer' column. ...
L.p. is messed up after groups are gethered (it is always grouped, rows come unsorted). i.e. "lp 2" is on the bottom below 3 and 4. (because it is in second group)
Most important problem is that selection is also wrong. (when i click on row X selection shows that Y is selected).
Only first row is not affected (second belongs into second group, but third is in first group).
SO - grouping feture ruins my form binding. What can be done about this?
9 Dec 2011, 5:16 AM
What is 'lp'?
Are you able to provide a small, reproducible test case for your problem?
9 Dec 2011, 6:55 AM
Lp.== list position (rownumberer label)
test case :
1. - make a grid with grouping,
2. add rownumberer column,
3. make sure server data (rows) come unsorted (see below)
4. TADA. (click on a row and then see what shows selection model; beside Lp behaviour);
store cfg :
... efect is as i stated - "L.p." is in wrong order and selection is also messed up (THIS IS THE PROBLEM).
11 Dec 2011, 7:07 AM
PS. The problem is settin remoteSort TRUE. JUst try to edit 2. or 3. row
10 Mar 2012, 11:34 AM
I have the exact same problem. It seems that the cell-editing plugin and the grouping feature don't work together quite well.
A possible solution is to let the data be sorted on the server-side.
I hope this problem gets fixed soon, as it is really an important feature for me!
29 Oct 2012, 2:03 AM
Is the thread alive?
Please help with this. I am stuck with this issue for too long now.
I have a grid with
There is a context menu defined on the grid. On menuitem click, I am trying to access the record selected because of the right click.
The model has an idPropery of the unique key, say ID.
The problem - When I right-click any row, the handler method gets called, has a param "model". It is the record right-clicked on. This record is wrong.
Lets say I have groups with IDs like these,
x -1, 2, 4 and 7
y -3, 5
If I right-click 1 or 2, the handler method has correct record. If I do it on 4, it gives the record with ID 3. On 7, it gives record with ID 4.
If this is done when grouping turned off through headers, it works just fine.
As David noted, data is being sorted on server side.
I have done lot of debugging, but couldn't find the root cause.
Thanks in advance for replies.
14 Feb 2013, 2:54 AM
I have similar problem with grouping and changing field that records are grouped by. After the change, selection picks wrong items. To solve this problem after every change that may move record from group to group (and change order) I always run sort() on a store. It looks like a huge time consume (fortunately I have small amount of data) but at least records are in correct order.
14 Apr 2013, 2:34 PM
Confirming same behaviour, editing the grouping column will move the row to
the new group and selection will consider the row being in the old position.
store.sort() solved it for the moment (ty ^^)
19 Mar 2014, 10:26 PM
I was having the same issue and the following did the trick:
I added this sorters in my store:
Note the 'category' is the column I used for grouping as groupField in my store.
Sorting with the groupField column is NEEDED, otherwise grid selection will work not properly.
31 Mar 2014, 6:47 AM
How can i force a re-sort of the store by the grouped column, when an user groups from any column in a grid ?
31 Mar 2014, 9:05 PM
There is a method sort in store, I hope it is what you need. Here docs (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-method-sort)
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.