Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1817

Please help me with this grouping

$
0
0
The idea is to bring together in this order using .rowGrouping(); :

-First for date.
-Second by ageGroup.
-Third by sex.

Ideas please?


$('#example').dataTable(
{
"aaData": 
  [
     {
         "date":"2014/01/11",
         "name":"Caroline",
         "ageGroup":"E",
         "sex":"F",
         "phone":"210-828-5555"
     },
     {
         "date":"2014/01/11",
         "name":"Barack",
         "ageGroup":"E",
         "sex":"M",
         "phone":"210-828-4444"},
     {
         "date":"2014/01/12",
         "name":"Michelle",
         "ageGroup":"B",
         "sex":"F",
         "phone":"210-828-7777"},
     {
         "date":"2014/01/12",
         "name":"Jhon",
         "ageGroup":"C",
         "sex":"M",
         "phone":"210-828-9999"}
  ],
       "aoColumns": 
         [
            { "mDataProp": "date" },
            { "mDataProp": "name" },
           { "mDataProp": "ageGroup" },
           { "mDataProp": "sex" },
           { "mDataProp": "phone" }
         ]
}
);


The idea is to bring together in this order using .rowGrouping(); :

-First for the date.
-Second by age group
-Third by gender

Ideas please?

Viewing all articles
Browse latest Browse all 1817

Trending Articles