Search
23433 results 3071-3080
Forum
- 14th Dec 2011Best way to add buttons in columns headers ?Hi, I'm trying to add a filter button next to the arrows which display sorting (I'm using jQueryUI mode) Currently, I'm doing it using the fnHeaderCallback: I add a div behind the DataTables_sort_icon span. I chose a div because adding a span mess up with the sort icon spans that datatables manage. However, I have problems with the layout, and I'm wondering if the approach I chose is right. Any suggestions, samples ? Thanks,
- 18th Oct 2011Columns destroyed, if I hide a field manually (but mColumns has it listened)I use a button to hide and show specific folders, let's call them "groupe" and "type". By standard "type" is visible and "groupe" is NOT visible. If I save the pdf on the standard-version, everything is correct. If I save the pdf and select before "groupe" to show it on the table, everything is correct. (it's not displayed on the pdf, but I havent's put this field into the "mColumns", so it's okay, that's not shown up) If I save the pdf and deselect before "type" to hide it on the table, the column-title "type" is missing on the pdf-document, but the fields are overwriting the following column. Furthermore in "mColumns" I've ordered to show this column "type" in the pdf-document. So 2 fields are in one column. Regards Sebastian
- 4th Aug 2011Removing first column's header "activecolumn" classHello I'm using a styled datatables component and would like to understand how datatables handles the active column state. Upon clicking a column header (other than the first) I'm running a script the removes the active column status from all column headers and assigns it to the clicked column header. However, the first column always get's the "activecolumn" class back after my script. Is there an API call that I could use to say which column is the active column? Taavy
- 2nd Aug 2011Adding rows with hidden columnsHello, I have a Datatable set up with a hidden column, when I add a row (fnAddData) it gives me an error (requested unknown parameter 5 from the source from row 1) How do I add the row accommodating the hidden column. Thanks, Cameron Anderson
- 28th Jun 2011wrong column headers and data in wrong columns on exportColumn headers and data are incorrectly exported. It goes wrong from column 2. Could it be because I have [code] < dl> and [/code] html in column 2 data? Any advice as to how I can get around this problem would be much appreciated.
- 27th Jun 2011Best method for changing columns headers into dropdown and calendar fieldsHi, I'd like to add filters with select dropdown AND calendar field to my table's column headers. I'm about to do it with fnInitComplete, and I wonder if it is the best way. Any advice? My actual config: "bJQueryUI": true, "bServerSide": true, "sAjaxSource": "index.php", "iDisplayLength": 100, "bScrollCollapse": true, "sScrollY":"1px", "bLengthChange": false, "bDeferRender": true, "bFilter": true, "bStateSave": true, "sPaginationType": "full_numbers", "fnDrawCallback": function(){ var maxH = parseInt($("#mainContainer").innerHeight() - 120); var tabH = $("#mainTable").height(); var finalH = tabH < maxH ? tabH : maxH; $("#mainContainer div.dataTables_scrollBody").height(finalH); } Many thanks!
- 4th May 2011[Please help]DataTables horizontal scrolling: column's width header and content doesn't equalI get that problem on Chrome and Safari (work great on FF, IE, Opera). I googled for a week but nothing can help! Here is the link to my site: http://lapvo3.com/news/modules.php?name=atntdatatable&lop=10A1&thang=11 ID of the sort table: example Please help me to solve that problem. Thanks a lot!
- 9th Apr 2011Problem with columnsFirst of all, I have to say that this is the best jquery plugin for dealing with tabular data that I have come across. Easy to integrate with lots of options, so keep up the good work guys. Now onto my issue. At the moment, I have a Datatable setup to display data from 6 fields. Everything works as expected but when I try to export to CSV, Excel or even Print, all I get is the same 6 fields being exported. How do I get all the fields exported? Is there a way I can get that done? Many thanks!
- 22nd Feb 2011Column headers not displaying properly because of hidden columns and column grouping?Hello, Thanks Alan for this wonderful plug-in. I have a table in which two first column are hidden. The colomn headers are not displaying properly for the last column group. (expense column). I have copied sample code below. [code] $(document).ready(function() { var oTable = $("#tblexample").dataTable( { "bPaginate": false, "bLengthChange": false, "bAutoWidth": false,"aaSorting": [[ 2, "asc" ]], "aoColumns": [ { "bVisible": false }, { "bVisible": false }, null, null, { "bSortable": false, sWidth: '90px'}, { "bSortable": false, sWidth: '90px'},{ "bSortable": false, sWidth: '90px'} , { "bSortable": false, sWidth: '90px'}, { "bSortable": false, sWidth: '90px'},{ "bSortable": false, sWidth: '90px'},{ sWidth: '90px' }, { "bSortable": false}, /* detail */{ "bSortable": false} /* detail */ ], "fnDrawCallback": function(){ //$('#tblpercentchange td').bind('mouseenter', function () { $(this).parent().children().each(function(){$(this).addClass('datatablerowhighlight');}); }); //$('#tblpercentchange td').bind('mouseleave', function () { $(this).parent().children().each(function(){$(this).removeClass('datatablerowhighlight');}); }); } }); }); </head> <body> <h1>Start demo</h1> <table id="tblexample"> <thead> <tr> <th rowspan="2">ID</th> <th rowspan="2">percent</th> <th rowspan="2">Name</th> <th rowspan="2">Phone</th> <th colspan="2">Salary</th> <th colspan="2">Income</th> <th colspan="2">Expense</th> <th rowspan="2">Change</th> <th rowspan="2">Detail</th> <th rowspan="2">Detail</th> </tr > <tr> <th>Nov10</th> <th>Dec10</th> <th>Nov10</th> <th>Dec10</th> <th>Nov10</th> <th>Dec10</th> </tr > </thead> <tbody> <tr class="odd"> <td>11111</td> <td>0.526</td> <td>Mr John}</td> <td>DDD</td> <td style="text-align:center;">11111</td> <td style="text-align:center;">2222</td> <td style="text-align:center;">3333</td> <td style="text-align:center;">44444</td> <td style="text-align:center;">55555</td> <td style="text-align:center;">66666</td> <td style="text-align:center;">77777</td> <td style="text-align:center;"><input class="submitdetails" type="submit" name="submit" value="NOV10"/></td> <td style="text-align:center;"><input class="submitdetails" type="submit" name="submit" value="DEC10"/></td> </tr> </tbody> [/code] Thanks.
- 23rd Nov 2010Hiding columns Server Side processingHello This code to hide the colum actually breaks the application and no row is shown. Dont know why, just copied it and pasted it. I m using version 1.7.2 [code] $(document).ready(function() { $('#ejemplo1').dataTable( { "aoColumns": [ /* id/ { "bVisible": false }, / from / null, / through / null, / to/ null, / duration / null, / to/ null, / price */ null ] "bProcessing": true, "bServerSide": true, "bJQueryUI": true, "sAjaxSource": "datatables/php/server_processing_data.php" } ); } ); [/code] anybody knows why ? regards