How to pass on css class to columns in each row
How to pass on css class to columns in each row
aswebtechnology
Posts: 19Questions: 0Answers: 0
Hi,
I am using datatables in my responsive website design. I want to know is there any way in which we can pass on css class name for different columns.
Actually i want to disable the columns when they are viewed in small screens like iphone and android phones etc. I am trying to pass on the classes like no_mobile which will be having display:none;
With the help of media queries i can define the values for no_mobile.
So please let me know if this can be achievable.
Here is my code.
[code]
$(document).ready(function() {
var oTable = $('#view').dataTable( {
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 20,
"sAjaxSource": "ajax/pages.php",
"sPaginationType": "full_numbers"
} );
} );
[/code]
[code]
Page Id
Title
Date Created
[/code]
Will appreciate if anyone can help me in achieving this.
Thanks in advance.
I am using datatables in my responsive website design. I want to know is there any way in which we can pass on css class name for different columns.
Actually i want to disable the columns when they are viewed in small screens like iphone and android phones etc. I am trying to pass on the classes like no_mobile which will be having display:none;
With the help of media queries i can define the values for no_mobile.
So please let me know if this can be achievable.
Here is my code.
[code]
$(document).ready(function() {
var oTable = $('#view').dataTable( {
"aLengthMenu": [[10, 20, 50, 100, -1], [10, 20, 50, 100, "All"]],
"bProcessing": true,
"bServerSide": true,
"iDisplayLength": 20,
"sAjaxSource": "ajax/pages.php",
"sPaginationType": "full_numbers"
} );
} );
[/code]
[code]
Page Id
Title
Date Created
[/code]
Will appreciate if anyone can help me in achieving this.
Thanks in advance.
This discussion has been closed.
Replies
http://datatables.net/ref#sClass
Good luck doing anything advanced with this table or getting information. Any advanced feature seems like a hacked, patched plugin e.g. refreshing and keeping settings, column resizing, etc.
The table should be rewritten from the ground up with the best of the plugins.