rowgrouping with server side implementation

rowgrouping with server side implementation

PCSPCS Posts: 2Questions: 1Answers: 0
edited March 2013 in DataTables 1.8
I am using server side processing to display data.I have a drop down list which displays the column headers.
When I select a column header I want to group the data based on that column.The rowGrouping plugin works fine the first time when I select an option from the dropdown list. When I select another option I see following error in the console:

TypeError: oSettings.aoData[iRow] is undefined.

The plugin worked fine when I was doing client side processing. I saw the example on the website(http://jquery-datatables-row-grouping.googlecode.com/svn/trunk/serverSideJSONP-objects.html), but it always groups based on first column.
How to make it work when I want to change the columns ?

Following is the code:
var url=''
var columns = [
{
"mDataProp" : 'details',
"bSortable":false
},
{
"mDataProp":"name"
},
{
"mDataProp":"group"
},
{
"mDataProp":'owner'
}
]
var table_options = {
"bProcessing":true,
"bServerSide":true,
"aoColumns":columns,
"sAjaxDataProp": "aaData",
"sDom":'<"top clearfix"lf>rt<"bottom clearfix"p>',
"sAjaxSource":url,
"sServerMethod": "POST",
"bPaginate":true
}

var otable = $(table).dataTable(table_options)

function group_data(col_index)
{
//col_index is the column index when I select an option from the dropdown list.
otable.rowGrouping({iGroupingColumnIndex: col_index,sGroupingColumnSortDirection: "asc",iGroupingOrderByColumnIndex: col_index,bExpandableGrouping:true });
}

Thanks
This discussion has been closed.