Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82468

overriding parameters datatables

$
0
0
Hi guys, i am using the datatable plugin multiple times in my application.
All of my tables should have the same basic-functionality but for every table i want to be able to specify the "aoColumns" parameter seperately.
(How) is this possible?

the basic code looks like this:
 jQuery('.dataTable').each(
        function () {
            if (jQuery(this).find('thead').length > 0) {//only apply when element has a thead element
                jQuery(this).dataTable({
                    //"sScrollX": "100%",
                    "bScrollCollapse": true,
                    "bAutoWidth": true, 
                    "oLanguage": {
                      "sSearch": ""
                    },
                    "bStateSave": true,
                   
                    "sPaginationType": "full_numbers",
                    "fnDrawCallback": function () {
                        jQuery(this).find('tr').bind('mouseenter', function () { jQuery(this).addClass('MyMouseOverRow'); });
                        jQuery(this).find('tr').bind('mouseleave', function () { jQuery(this).removeClass('MyMouseOverRow'); });
                        jQuery(this).find('tr').bind('mouseover', function () { jQuery(this).attr("style", "cursor:pointer"); });
                    }
                });
            }
        }
        );

But as i said i want to specify a different "aoColumns" parameter for each table (to specify sorting columns etc..)

Im glad for any help on this...

Best regards,
r3try

Viewing all articles
Browse latest Browse all 82468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>