bVisible and hiding columns
bVisible and hiding columns
Currently I use bVisible to hide some columns but when loading the site I can still see column header of the hidden columns for some milliseconds before they disappear. Is there any other way to hide columns?
The reason I need those columns in the first place is that I need to grab the values of those columns and use them with fnRender.
Since I only need the values of the column to be used with fnRender I dont want those columns to be displayed, thats why I use bVisible to hide them.
But I can still see them a millisecond on page load and then they disappear, is there a way to not display them at all?
[code] $(document).ready( function() {
$('#example').dataTable( {
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
] } );
} );[/code]
My second question is:
I currenty have this function on my site:
[code]<?php if( protectThis("1, 2") ) : ?>
This html text is viewable only to user levels 1 and 2
<?php endif; ?> [/code]
With this function I am able to show content to user levels 1 and 2 only.
I want to use the same function to display some columns only for user level 1 and 2.
What would the best approach be to achieve this?
Thanks in advance
The reason I need those columns in the first place is that I need to grab the values of those columns and use them with fnRender.
Since I only need the values of the column to be used with fnRender I dont want those columns to be displayed, thats why I use bVisible to hide them.
But I can still see them a millisecond on page load and then they disappear, is there a way to not display them at all?
[code] $(document).ready( function() {
$('#example').dataTable( {
"aoColumnDefs": [
{ "bVisible": false, "aTargets": [ 0 ] }
] } );
} );[/code]
My second question is:
I currenty have this function on my site:
[code]<?php if( protectThis("1, 2") ) : ?>
This html text is viewable only to user levels 1 and 2
<?php endif; ?> [/code]
With this function I am able to show content to user levels 1 and 2 only.
I want to use the same function to display some columns only for user level 1 and 2.
What would the best approach be to achieve this?
Thanks in advance
This discussion has been closed.