Remove rowgrouping
Remove rowgrouping
am using DataTables Row Grouping Add-on. I used it by select box change event.
Code
In PHP :
[code]
None
Domain
Type
Category
Status
[/code]
In JS :
[code]$(document).ready(function() {
var DTable = $('#discovery').dataTable( {
"sDom": "<'row-fluid'<'span3'<'toolbar'>><'span3'<'selectbar'>><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"bPaginate": false
});
$('#Group-Discoveries').live('change', function(){
var index = $(this).val();
if(index == ''){
}
else{
DTable.rowGrouping({
"iGroupingColumnIndex": index,
"bHideGroupingColumn": false,
"bHideGroupingOrderByColumn": false,
"sGroupingClass":"group_"+index,
"bSetGroupingClassOnTR":true,
"bExpandableGrouping":true
});
}
});
});[/code]
I want to remove rowgrouping when the index is empty.
Thanks.
Code
In PHP :
[code]
None
Domain
Type
Category
Status
[/code]
In JS :
[code]$(document).ready(function() {
var DTable = $('#discovery').dataTable( {
"sDom": "<'row-fluid'<'span3'<'toolbar'>><'span3'<'selectbar'>><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"bPaginate": false
});
$('#Group-Discoveries').live('change', function(){
var index = $(this).val();
if(index == ''){
}
else{
DTable.rowGrouping({
"iGroupingColumnIndex": index,
"bHideGroupingColumn": false,
"bHideGroupingOrderByColumn": false,
"sGroupingClass":"group_"+index,
"bSetGroupingClassOnTR":true,
"bExpandableGrouping":true
});
}
});
});[/code]
I want to remove rowgrouping when the index is empty.
Thanks.
This discussion has been closed.
Replies