Ordering inside Row Group without changing Group order.
Ordering inside Row Group without changing Group order.

Link to test case:
live.datatables.net/ruxakoga/5/edit
Description of the current Datatable:
I have that live demo running okay. As you can see there are multiple Row Groups (ie: Receiving, Raw Deep Lane, Storage, and so on).
Row Groups must always stay ordered the way they are now. I mean... order must be:
1. RECEIVING
2. RAW_DEEP_LANE
3. STORAGE
4. FINISHING
5. WRAPPER
6. LAMINATOR
7. PRESS_7
8. PRESS_8
9. SHX1
10. WIP
11. PR_CHARGING
Description of problem:
I want to be able to Order By "AGV Tasks" column inside the Row Groups but without changing Row Group order itself.
So, in images this would be seen something like this.
I tried for several hours to achieve that without luck. I've done tons of research but I don't see how...
Any advice is welcome.
This question has accepted answers - jump to:
Answers
I would look at using Orthogonal Data for the sorting of the
dataSrc: 'area',
column. I would create a global variable that contains and object that denotes the order of the Row Group. Then useorder
to order by that column followed by the AVG Tasks column. Here is my example:http://live.datatables.net/ruxakoga/6/edit
Note that in the object I used letters instead of numbers for the Row Group order. Its due to Datatables type detection and that column is typed as a string. You could use "01", "02", etc instead to sort the strings by a numeric representation if you wish.
Kevin
Kevin. Your live example is by default already ordered 'asc' on AGV Task.
I would like to keep it the way is given on the dictionary data when loaded first time and if you hit AGV Task header then order it asc/desc by that field.
Anyways hitting that AGV Tasks header does nothing on your live demo. Why?
You have this config:
This turns of the user's ability to order the columns. I commented it out and used
oderFixed
for column 0. Now you can sort theAGV Tasks
column and keep the order of the RowGroup.http://live.datatables.net/ruxakoga/7/edit
Kevin
Excellent Kevin. It works like a charm.
The only thing I'm struggling now is that when I click on "AGV Tasks" column it orders ASC first. I've to click again so it's order DESC.
I'd like to invert it so when I click first time it order DESC and if I click again it orders ASC. Is that possible? It's like inverting from 'asc' 'desc' to 'desc' 'asc'.
I think you can control that using
columns.orderSequence
.Kevin