Search
23433 results 3021-3030
Forum
- 26th Feb 2015Fixed columns issues on iphone/ipadHave issue with FixedColumns on iphone/ipad. When scroll to side fix column show up under the fix column (duplicated). On desktop iphone emulator it works good, only have problems with actual iphone device. Here is print screen: https://www.dropbox.com/s/mh89dt569acl9hp/photo.PNG
- 20th Feb 2015Static column widths on specific columns only.I find myself more and more needing to have a column with a static width for an icon or some-other indicator. But really like to use the autowidth functionality in Datatables for dealing with displaying the dataset in the best way for the user. Is there a method in DataTables for doing this already that I am just missing? If there isn't I'd like to throw it out there as a feature request.
- 18th Feb 2015Control Width of columns in bootstrap 3Hello, Can anyone please let me know how can we control the width of column in bootstrap 3. Thanks in advance...
- 3rd Feb 2015server side, new api, stateSave, colReorder and column's order in the xhr requestHello, I'm using DT 1.10.4, the new api and server side processing. I've switch to yadcf instead of ColReorder. I'm facing a problem with yadcf and after debugging, i've noticed that the xhr request send was different when you reload the html page than the one send when you use the DT pagination system. Here is my test case: http://yadcf.johndegey.org/ If you switch field2 and field3, then reload the page, the xhr request will be columns[0][data] field1 columns[0][name] field1 columns[0][orderable] true columns[0][search][regex] false columns[0][search][value] columns[0][searchable] true columns[1][data] field2 columns[1][name] field2 columns[1][orderable] true columns[1][search][regex] false columns[1][search][value] columns[1][searchable] true columns[2][data] field3 columns[2][name] field3 columns[2][orderable] true columns[2][search][regex] false columns[2][search][value] columns[2][searchable] true If you just go to page 2 with the pagination, it looks like columns[0][data] field1 columns[0][name] field1 columns[0][orderable] true columns[0][search][regex] false columns[0][search][value] columns[0][searchable] true columns[1][data] field3 columns[1][name] field3 columns[1][orderable] true columns[1][search][regex] false columns[1][search][value] columns[1][searchable] true columns[2][data] field2 columns[2][name] field2 columns[2][orderable] true columns[2][search][regex] false columns[2][search][value] columns[2][searchable] true Notice the column 1 is now field3 and column 2 is field2. Is this an expected behavior ? Shouldn't the 2 request be the same ? Here is the discussion we have on github https://github.com/vedmack/yadcf/issues/151 thanks for help John
- 29th Jan 2015Avoid columns sort in Datatables while loading pageHi every one I am using Datatables and I load data rows from a sql table with a specific sort order, how can tell to Datatables grid don't apply any sort yourself?, I tried many examples with parameter ons the ready function without success, Thank You in advance for reply This is function ready code ( jquery.dataTables.js version 1.9.3) $(document).ready(function() { $('#example').dataTable( { "bStateSave": true, "oLanguage": { "sProcessing": "Caricamento...", "sLengthMenu": "Mostra MENU Messaggi per pagina", "sZeroRecords": "Nessun Messaggio trovato", "sInfo": "Visualizzazione da START a END - di TOTAL Messaggi", "sInfoEmpty": "Visualizzazione dal record 0 al 0 - Totale 0 Messaggi totali", "sInfoFiltered": "(Filtrato da un totale di MAX Contatto)", "sInfoPostFix": "", "sSearch": "Cerca:", "sUrl": "", "oPaginate": { "sFirst": "Inizio", "sPrevious": "Precedente", "sNext": "Successivo", "sLast": "Fine" } } } ); } );
- 26th Jan 2015taking first step to try cursor between columns - nothingGreetings - Di have DataTables1.10.2, downloaded and added /js/ColReorderWithResize.js, initialization code inserted [with #example], NOW WHAT? i get no response from my cursor on the table. anyone have code i can learn from for actually hooking this up into my own code base?
- 12th Jan 2015Is it possible to remove columns from query string for server side processing?While useful to be be able to send all the parameters for searching and sorting listed here: https://datatables.net/manual/server-side The query string can end up quite large and in my current application I only require the draw, start, length, search[value] and order[i] parameters. So the main question is, is it possible to toggle the inclusion of columns[i] on/off to reduce the data sent to server? If not, does anybody know if the request can be intercepted to strip it from the query string? I guess another logical step to this, would be to allow the client to use the available data to build a custom query string to work with generic web API end points. By the way thanks for providing such a great tool!
- 23rd Dec 2014Sorting columns with numbers and NULL stringSome of my cells do not have any value, and if I sort them, the numbers are sorted properly : 2 4 33 121 I need to display NULL instead of an empty sell. For that, I just check if the value of my data is empty, I assign a string NULL to it, but in this case, sorting interprets my numbers as strings and sorts them in the following order: 121 2 33 4 Is there a way to set another condition so that sort function interprets NULL as a negative number? My tables are different every time, so I will not be able to specify sorting type for a specific column, it just has to interpret NULL as a negative. Or maybe there is another solution that I didn't think of? Thank you
- 16th Oct 2014Misaligned with the table columns in the DataTable [With video] [With sources]Hello, I'm having a problem a few days ago. I have a datatable which is displayed within a modal bootstrap. The data in this table are populated using json. My problem is that the THEAD table is getting misaligned with the rest of the table. And when I click on any title filter corrects the THEAD. If I present this table outside the modal it does not give this problem. My datatable is using the bootstrap theme. I made a video showing the error reported. For better understanding. http://www.imagero.com.br/error_dataTable_bootstrap.avi Sources with the script that is giving problem. Look at the table outside the modal functions, and the same table that is modal in error in THEAD. the download link: http://www.imagero.com.br/datatable_sources_error_modal_bootstrap.zip
- 9th Oct 2014Unable to get input value from specific columnsHi everyone,actually i'm designing a user permissions, i have already populated the datatables with a list of modules and have add 4 checkbox for add, read, update, delete. Unfortunately i`m unable to get the value true or false of the checkbox for specific rows... Can anyone help thanks... My html code <table class="table table-bordered table-striped table-hover table-heading table-datatable" id="datatable-2"> <thead> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </thead> <tbody> <tr> <td></td> <td></td> <td></td> <td style="text-align:center;vertical-align:middle;"> <input type="checkbox" id="create" name="create"> </td> <td style="text-align:center;vertical-align:middle;"> <input id="read" type="checkbox" name="read"> </td> <td style="text-align:center;vertical-align:middle;"> <input id="update" type="checkbox" name="update"> </td> <td style="text-align:center;vertical-align:middle;"> <input id="delete" type="checkbox" name="delete"> </td> </tr> </tbody> <tfoot> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </tfoot> </table> my script <script type="text/javascript"> // Pagination and search code function AllTables(){ TestTable2(); LoadSelect2Script(MakeSelect2); } function MakeSelect2(){ $('select').select2(); $('.dataTables_filter').each(function(){ $(this).find('label input[type=text]').attr('placeholder', '<?= $search ?>'); }); } $(document).ready(function() { // Load Datatables and run plugin on tables LoadDataTablesScripts(AllTables); $('#userpermission').submit(function( event ) { event.preventDefault(); var oTable = $('#datatable-2').dataTable(); var nlines = $(oTable.fnGetNodes()).length; for(var i=0; i<nlines; i++){ var alldata = []; var column0 = oTable.fnGetNodes()[i].cells[0].childNodes[0]; var column1 = oTable.fnGetNodes()[i].cells[1].childNodes[0]; var column2 = oTable.fnGetNodes()[i].cells[2].childNodes[0]; var column3 = oTable.fnGetNodes()[i].cells[3].childNodes[0]; // here i want to retrieve every row into the array alldata.push(oTable.$(column0).text(), oTable.$(column1).text(), oTable.$(column2).text(), oTable.$(column3).$('input').val()); console.log(alldata); } }); }); function LoadDataTablesScripts(callback){ function LoadDatatables(){ $.getScript('<?= base_url() ?>public/plugins/datatables/jquery.dataTables.js', function(){ $.getScript('<?= base_url() ?>public/plugins/datatables/ZeroClipboard.js', function(){ $.getScript('<?= base_url() ?>public/plugins/datatables/TableTools.js', function(){ $.getScript('<?= base_url() ?>public/plugins/datatables/dataTables.bootstrap.js', callback); }); }); }); } if (!$.fn.dataTables){ LoadDatatables(); } else { if (callback && typeof(callback) === "function") { callback(); } } } function LoadSelect2Script(callback){ if (!$.fn.select2){ $.getScript('<?= base_url() ?>public/plugins/select2/select2.min.js', callback); } else { if (callback && typeof(callback) === "function") { callback(); } } } function TestTable2(){ var asInitVals = []; var oTable = $('#datatable-2').dataTable( { "aaSorting": [[ 0, "asc" ]], "sDom": "<'box-content'<'col-sm-6'f><'col-sm-6 text-right'l><'clearfix'>>rt<'box-content'<'col-sm-6'i><'col-sm-6 text-right'p><'clearfix'>>", "sPaginationType": "bootstrap", "oLanguage": { "sSearch": "", "sLengthMenu": '_MENU_', "sUrl": "<?= base_url() ?>public/language/<?= $language ?>.txt" }, bAutoWidth: false }); var header_inputs = $("#datatable-2 thead input"); header_inputs.on('keyup', function(){ /* Filter on the column (the index) of this element */ oTable.fnFilter( this.value, header_inputs.index(this) ); }) .on('focus', function(){ if ( this.className == "search_init" ){ this.className = ""; this.value = ""; } }) .on('blur', function (i) { if ( this.value == "" ){ this.className = "search_init"; this.value = asInitVals[header_inputs.index(this)]; } }); header_inputs.each( function (i) { asInitVals[i] = this.value; }); } </script>