How to pass on css class to columns in each row

How to pass on css class to columns in each row

aswebtechnologyaswebtechnology Posts: 19Questions: 0Answers: 0
edited May 2012 in General
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.

Replies

  • bidonbidon Posts: 28Questions: 0Answers: 0
    edited May 2012
    Try this...

    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.
  • aswebtechnologyaswebtechnology Posts: 19Questions: 0Answers: 0
    Thanks for your help bidon. Thanks a lot mate. It did solved my purpose. Datatables is really cool. Its now part of my responsive web design framework.
This discussion has been closed.