Datatables with rowGrouping unable to hide columns

Datatables with rowGrouping unable to hide columns

monkeytoothmonkeytooth Posts: 22Questions: 0Answers: 0
edited September 2012 in General
The JS:
[code]$(document).ready(function() {
// $( "#dashboard_container" ).tabs();
$('#orgListings').dataTable({
"bRetrieve": true,
"aoColumns":
[
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
]
}).rowGrouping({
iGroupingColumnIndex: 1,
sGroupingColumnSortDirection: "asc",
iGroupingOrderByColumnIndex: 0,
bExpandableGrouping: true,
bExpandSingleGroup: true,
iExpandGroupOffset: -1
});
});[/code]

The HTML:
[code]


Group IndexGroup Display Name
Organization
Volumes
Read (MB/s)
Write (MB/s)
Volume Size (GB)
My Cost (USD)
Comments





0Artful Scientific
Something Co.
information
0
0
0
$0
View



[/code]


The problem:

I am able to successfully do the row groupings and it works fine, however I have a need where I need to hide 2 of the columns to certain roles. As well as hide an additional column which would be the Equivlent of the "Organization" column which the grouping uses. However from the above JS you can see I have tried hiding all columns just to see if any would actually hide in my last ditch effort before coming here. No matter which ones all or one none will hide. Anyone know a work around for this? As I need the columns to remain but hidden to the actual view

Replies

  • monkeytoothmonkeytooth Posts: 22Questions: 0Answers: 0
    Finally found out what my issue was.. Apparently the author of the template I bought "White Label" from themeforest.net used a bit of code [code]$content.datatable({sPagination:"full_numbers"});[/code] in a globalized script.js. That was being ran on my tables before anything else was thus leaving anything I did custom in the $.datatable call useless on any table. I commented that bit out after finding it, and everything works as expected from datatables.


    Thank you.
This discussion has been closed.