How to group multiple coloumn in jquery datatables

How to group multiple coloumn in jquery datatables

bmunnabebmunnabe Posts: 1Questions: 1Answers: 0

How to collapse and expand the table based on multiple coloumn grouping. for example i have table like this


location | size | cont_no | price | depot | cond

USA | XX | 123 | 230 | SED | LK
USA | YY | 343 | 330 | ASD | HK
UAE | XX | 233 | 230 | SED | LK
IND | ZZ | 123 | 230 | SAD | FK
IND | XX | 213 | 430 | ASD | KK
IND | YY | 433 | 870 | GFD | FK
USA | YY | 865 | 230 | SED | LK
UAE | XX | 976 | 430 | SED | HK
USA | ZZ | 342 | 230 | CCD | HK
UAE | XX | 132 | 445 | SED | KK
UAE | ZZ | 064 | 323 | YYD | LK

IND | YY | 452 | 130 | ITG | HK

this is how i need to group the above table


location | XX | YY | ZZ

UAE   |   3    |    0   |   1  |
USA   |   1    |    2   |   1  |
 IND    |   1     |    2   |   1  |

so now i want to group based on location and size coloum, Eg: USA has 3 XX and 0 YY and 1 ZZ,

and then when i click the row i want to expand and show those 3 XX and 0 YY and 1 ZZ other four coloumn cont_no, price, depot, cond

please someone help me or give me some suggestion or link for reference.thank you

This discussion has been closed.