Turning rowGrouping on or off dynamically.

Turning rowGrouping on or off dynamically.

codemonkey65codemonkey65 Posts: 14Questions: 3Answers: 0
edited July 2012 in Plug-ins
I am using the .rowGrouping plug in successfully but was wondering if it might be something that can be turned on or off dynamically. For example, if the data being bound to the datagrid contains certain information or if a parameter being passed contains specific information, is it possible to activate or de-activate the rowGrouping functionality?

The code implementing the datatable is as follows:

$('#grdLoadingData').dataTable({
"bLengthChange": false,
"bPaginate": true,
//"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aaData": records,
"sDom": "T<'clear'>lfrtip",
"oTableTools": {
"sRowSelect": "multi"
},
"bAutoWidth": false,
"aoColumns": [
{ "sTitle": "MC #", "sWidth": "40px" },
{ "sTitle": "Order #", "sWidth": "40px" },
{ "sTitle": "Site", "sWidth": "25px" }
]
}).rowGrouping({
bExpandableGrouping: true,
iGroupingColumnIndex: 3
});

I would only like the grouping functionality available if some criteria is true.
This discussion has been closed.