DataTables logo DataTables

via Ad Packs
Row grouping using ALL displayed columns
  • I need a layout that automatically groups rows in ALL columns. For example, here's a table of data I'd like to show:
     
    Stage 			Actvt Type 	Activities
    --------------------------------------------------
    Active Consideration	Email		32
    Active Consideration	Meeting 	1
    Active Consideration	Phone 		5
    Customer 		Meeting 	1
    Customer 		Phone 		3
    Prospect 		Email		12
    Prospect 		Meeting 	1
    Prospect 		Phone 		1
    Qualified Lead		Email		48
    
    

    I'd like to display it in this manner:
    Stage 			Actvt Type 	Activities
    --------------------------------------------------
    Active Consideration	Email		32
    			Meeting 	1
    			Phone 		5
    Customer 		Meeting 	1
    			Phone 		3
    Prospect 		Email		12
    	 		Meeting 	1
    	 		Phone 		1
    Qualified Lead		Email		48
    

    If at all possible, I'd like to display row-totals where applicable, but I can live without that, for now.

    I see an example that groups data in the first column here: http://datatables.net/release-datatables/extras/FixedColumns/row_grouping_height.html. It does exactly what I need - on the first column. I don't see a way to do that for more columns or, as I need it, for all displayed data. I tried the "iLeftColumns" option - the resulting table remains un-collapsed.

    My set-up for DataTables is as below:
    			var oTable = $('#reportData').dataTable({
    				"aaData": dataTblData,
    				"aoColumns": dataTblHdr,
    				"bPaginate": false,
    				"bLengthChange": false,
    				"sScrollX": "100%",
    				"bProcessing": true,
    				"bStateSave": true,
    				"sDom": "\"<clear>\"fTti",
    				"oTableTools": {
    					"sSwfPath": "..jquery/swf/copy_csv_xls_pdf.swf"
    				}
    			});
    

    Is there a way to do what I need? Pardon me if this has already been asked and solved in this Forum - I couldn't find the answer in my search. Thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.