Grouping

Grouping

kovrikkovrik Posts: 2Questions: 0Answers: 0
edited May 2012 in General
Hi!
I have a table which looks like:
[code]
-row1 5
row1.1 2
row1.2 1
row1.3 1
row1.4 1
-row2 7
row2.1 2
row2.2 1
row2.3 1
row2.4 1
row2.4 2
[/code]
As you can see, there are rows and sub-rows (some kind of grouping I made by myself).

I've installed DataTables with Grouping plugin. Now table looks like:
[code]
[row1-group-expander ]
-row1 5
row1.1 2
row1.2 1
row1.3 1
row1.4 1
[row2- group-expander ]
-row2 7
row2.1 2
row2.2 1
row2.3 1
row2.4 1
row2.4 2
[/code]
Now I can click both DataTables expander and my own expander.

How to display data from my own expander on DataTables group-expander and make it sortable?

Like:
[code]
[row1 5 ] <- acts like expander
row1.1 2
row1.2 1
row1.3 1
row1.4 1
[row2 7 ] <- acts like expander
row2.1 2
row2.2 1
row2.3 1
row2.4 1
row2.4 2
[/code]

After sorting (desc) it should look like:
[code]
[row2 7 ] <- acts like expander
row2.1 2
row2.4 2
row2.2 1
row2.3 1
row2.4 1
[row1 5 ] <- acts like expander
row1.1 2
row1.2 1
row1.3 1
row1.4 1
[/code]

How to implement this?
Thank you!

Replies

  • kovrikkovrik Posts: 2Questions: 0Answers: 0
    Now I've made something like:
    [code]
    [row2 ] <- acts like expander
    row2.1 2
    row2.4 2
    row2.2 1
    row2.3 1
    row2.4 1
    [row1 ] <- acts like expander
    row1.1 2
    row1.2 1
    row1.3 1
    row1.4 1
    [/code]
    How to display sum of all values in expander?
This discussion has been closed.