Search
18504 results 2681-2690
Forum
- 8th Jun 2020Ajax Sorl sort columns DatatableThanks. I have 11.000 records. In the end I was able to solve it: var table = $(this.target).dataTable({ "bJQueryUI": true, "pagingType": "full_numbers_no_ellipses", "dom": "tr" + "<'row'<'col-xs-6'l><'col-xs-6'p>>", "drawCallback": function (settings) { var api = this.api(); $('#pager-header').html(settings._iRecordsTotal); // Output the data for the visible rows to the browser's console // console.log(api.rows({ page: 'current' }).data()); }, "rowCallback": function (row, aoData) { var description = "..."+ aoData[5][0].toString().substring(0,50)+"..."; var title = ''+ aoData[4][0] +''+''+' '+ description+' ' $('td:eq(1)', row).html(title); }, "bLengthChange": true, "bProcessing": true, "bServerSide": true, "sAjaxSource": null, "fnServerData": function (sSource, aoData, fnCallback, settings) { // Rownumber var rows = getSetting(aoData, 'iDisplayLength'); self.manager.store.addByValue('rows', settings._iDisplayLength); // Filtering if (typeof q != 'undefined') { var q = getSetting(aoData, 'sSearch'); if (q.length > 0) self.manager.store.addByValue('q', q); else self.manager.store.addByValue('q', '*:*'); } self.manager.store.addByValue('q', '*:*'); // Fields self.manager.store.addByValue('fl', Mfields); self.manager.store.addByValue('start', parseInt(settings._iDisplayStart)); self.manager.doRequest(); self.manager.setCallback(this, fnCallback); } , "aoColumns": [ { aoData: "id" }, { aoData: "title", "defaultContent": "" }, ] }); Thank you :)
- 5th Jun 2020Ajax post - is there any way to get actual JSON?Your screenshot clears up what you are asking about. Thats why Colin asked for a test case. You can use ajax.data to convert to JSON string. See the last example in the docs. Kevin
- 1st Jun 2020I am getting data by ajax to my datatable but the view is squeezed.Thanks a lot @kthorngren . Issue resolved with style=width:100%
- 22nd Apr 2020Ajax & serverprocessing and multi-selection across redraws (Feature request?)If I understand it correctly, this would still erase the lines from dom and in turn removing the selection. :( Thanks anyway
- 22nd Apr 2020Datatable AJAX Join Tables to Get JSON valuesThanks for posting back - good to hear you've got it fixed. Allan
- 7th Apr 2020Populate field based on ajax but don't submit itThanks, got it.
- 3rd Apr 2020Remember row selection across ajax page changesThanks @kthorngren - I guess I thought this comment (https://datatables.net/forums/discussion/comment/49638/#Comment_49638) by @allan What I'll do is look at introducing a new mode into TableTools which can use the row ID of rows to retain select - a bit like this method: http://datatables.net/release-datatables/examples/server_side/select_rows.html suggested that this was going to be incorporated as an automatic feature a long time ago (back when TableTools was still a thing). Anyway, great to know I haven't missed an obvious setting.
- 18th Mar 2020ajax data filterGlad you got it working. Didn't know that you meant to see both, London and New York. Cheers
- 12th Mar 2020Editor (ajax) - how can we use the query wildcard "%"thx allan - that does the job!
- 4th Feb 2020ajax json data value into renderIf you follow my example it should work. Try not to use “meta“.