jquery-datatables

export data to excel not working in datatables

浪尽此生 提交于 2019-12-04 14:23:30
export data and TableTools not working for me, after adding this line between head: <script type="text/javascript" language="javascript" src="../../components/dataTables/media/js/jquery.dataTables.min.js"></script> <script type="text/javascript" language="javascript" src="../../components/dataTables/media/js/ZeroClipboard.js"></script> <script type="text/javascript" language="javascript" src="../../components/dataTables/media/js/TableTools.js"></script> and change table id prop in this: $('#myTable').dataTable({ "sDom": '<"clear">lfrtipT' }); i can see tableTools buttons on the table but, thay

Select all rows in active page only jquery Datatable

只谈情不闲聊 提交于 2019-12-04 13:46:32
I'm using jquery datatable on a gidview and there is a checkbox on the datatable header. The purpose of that checkbox is to check all checkboxes in the current page of the gridview rows. So am using the function var table = $('#Tab_ApplicantList').DataTable(); var rows = $('#Tab_ApplicantList').dataTable().fnGetNodes(); $(rows).each(function () { $(this).find("input.grey").iCheck('check'); }); But the problem is it is selecting all rows in the datatable, not just the rows in the active page. So how can I achieve that to check rows in the current page alone? I've got an answer to my question

Datatable data binding using knockoutjs

一个人想着一个人 提交于 2019-12-04 13:20:18
I want to render data into table using datatable knockoutjs binding. I am using the below link and code for rendering data into table. http://datatables.net/dev/knockout/ The only change I did in above example is while rendering age data I have added input box in age col for ever record and Updatebutton at the bottom of table, so that user can change his age and click of update button data should be updated automatically and in next page it should reflect in table. The issue am facing is that i am unable to update local js "people" model and hence unable to bind updated data using knockoutjs.

jquery datatables Ajax-Error / http://datatables.net/tn/7

Deadly 提交于 2019-12-04 11:13:13
问题 Please look at my problem below: I use in my MVC-Web-Applikation the jquery datatables. When i display only 8 columns, everything works fine. But with 1 more column, i get the ajax-error-message, see title. The controller wokrs fine, because the 8 columns work fine. Here my code of the view: <script type="text/javascript"> $(document).ready(function () { var table = $('#example').DataTable({ "processing": true, "serverSide": true, "ajax": "@Url.Action("List", "DFS_Akustik")", "columns": [ {

Jquery - DataTables [tableTools]: export only visible rows

ε祈祈猫儿з 提交于 2019-12-04 11:00:38
问题 I just started out using jQuery DataTables. using the tableTools of DataTables, is it possible to only export visible rows instead of all the rows? If for example the pagination was set to 10 I would expect only 10 rows to be exported. The same goes for a search result. Here's part of the code: $(document).ready(function() { var table = $('#example').DataTable({ "pagingType": "full_numbers", "iDisplayLength" : 10, dom: 'T<"clear">lfrtip', "oTableTools": { "aButtons": [ { "sExtends": "copy",

Update datatables (JQuery) when button is clicked

南笙酒味 提交于 2019-12-04 10:57:27
问题 I've created a simple form and I'm using the Datatables jQuery plugin to display some data in it. Data are being populated by a php script (process.php) which returns the proper results in JSON format. In the form, there is a button that sends the value of the textbox to the process.php. The problem is that I cannot update/alter datatable with the new data received by process.php script when the button is clicked . The code of the form: <form name="myform" id="myform" action="" method="POST">

How to use fnServerData?

时光怂恿深爱的人放手 提交于 2019-12-04 10:05:30
Can anyone show me how to use fnServerData ?. $(document).ready( function() { $('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "xhr.php", "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) { oSettings.jqXHR = $.ajax( { "dataType": 'json', "type": "POST", "url": sSource, "data": aoData, "success": fnCallback } ); } } ); } ); Below is my Ajax call, i want to replace the ajax call with the fnServerData. $.ajax({ type: 'GET', url: url, jsonp: true, contentType: "application/json", dataType: 'jsonp', success: function (data) { $.each(data.value,

jquery datatables selected row's data getting reset on paginated table while navigating on pages

£可爱£侵袭症+ 提交于 2019-12-04 09:47:55
问题 I am using jquery datatables . http://jsfiddle.net/s3j5pbj4/2/ I am populating around 3000 records in paginated table.Problem is that If am selecting few checkbox and dropdown options in first page and move to next page (by clicking on paginated next button) and again come back on first page , selected data is getting reset again (i.e. lets say every paginated page shows 10 rows on each page and if I have selected 5 rows on first page and then navigate to next page and again come back to

how to disable a DataTables/TableTools button

十年热恋 提交于 2019-12-04 07:27:41
I'm using DataTable 1.10 and TableTools 2.2.1. Given the following snipped I would like to disable/enable the edit-button. var myTable = $("#myTable ").DataTable({ tableTools : { "aButtons" : [ { "sExtends" : "text", "sButtonText" : "Edit", "fnClick" : function(nButton, oConfig, oFlash) { /* some stuff */ } }] } }) Is there a possibility to do this at runtime? Thanks a lot This was a good question! Seems that the fnClick in dataTable.tabletools().fnSettings().buttonSet[id].fnClick only is a reference to the event stored elsewhere, not accessible (changing fnClick on the API has no effect).

How to use a link in TableTools instead of flash buttons

我的梦境 提交于 2019-12-04 06:43:18
I'm trying to find a way to change the buttons on TableTools. I'd like to use my own customized links instead of the flash buttons. Is there a way I can do that? Any good resource teaching me how to make that modification and still able to use the functionalities, like button collection, etc. According to the creator , the only way to get the TableTools export functionality is by using the Flash buttons. The other threads that you found should say that currently, no, this is not an option that TableTools provides. The Flash option is used to provide cross browser / platform ability to save