Row Grouping in Datatables ver 1.8.1

Row Grouping in Datatables ver 1.8.1

KalaiselvanKalaiselvan Posts: 1Questions: 0Answers: 0
edited September 2012 in DataTables 1.8
Hi,
Am using Datatables version 1.8.1 to bind the datas with Group Headers. Follows the Script

$(document).ready(function () {


var StateTable = $('#salesReport').dataTable(
{
"sAjaxSource": "Home/GetDataTableSales"
}).rowGrouping();

});

Unable to get the Row Grouping from this Script. Here salesReport is my Table name and GetDataTblesSale is my function name.
It lists out nearly 1 Lac records. With my first column is StateName. Need those State datas to be Grouped and shows Sub totals for Each States.
Please help me to fix this Issue.

Ex: Datatable Output:
[State] [District] [Population] [Area]
TN Chennai 50000 350
TN Madurai 40000 250
TN Trichy 30000 300
AP Nellore 45000 100
AP Vizag 30000 200

Expected Output:

[State] [District] [Population] [Area]
TN Chennai 50000 350
TN Madurai 40000 250
TN Trichy 30000 300
Sub Total 120000 900
AP Nellore 45000 100
AP Vizag 30000 200
Sub Total 75000 300
This discussion has been closed.