Search
18959 results 681-690
Forum
- 3rd Jan 2019How i can edit and create one Row in datatables pluginHello everyone, i use Rest API with Ajax, and i use Jetty server. How i can modify one row. the button " Edit " i make it inside the Table but i don't have any Idea witch method i have to use, i don't want to use Editor plugin, if u have some Idea tell me please. i need to method how to edit one row and how to create"Add" new row! i gonna post one picture for the my Table to see how's it, and the code for Ajax. Thank you. :smiley: $.ajax({ url: "gooooood/job", method: "GET", dataType: "json", success: function (r) { var data = r.data var dataSet = []; for (var i = 0; i < data.length; i++) { if (data[i].type == undefined) var type_name = '' else { var type_name = data[i].type.name; } if (data[i].person == undefined) var person_name = '' else { var person_name = data[i].person.name; } if (data[i].location == undefined) var location_name = '' else { var location_name = data[i].location.name; } dataSet.push([ data[i].id, data[i].device, type_name, data[i].additionalInfo, data[i].serialNumber, person_name, location_name, "<button class='edit'>Edit</button><button class='delete'>Delete</button>" ]); } $('#data-table').DataTable({ data: dataSet, columns: [ { title: "Id" }, { title: "Device" }, { title: "Type" }, { title: "Additional Info" }, { title: "Serial Number" }, { title: "Person" }, { title: "Location" }, { title: "Actions" } ], "rowCallback": function (row, data) { $(row).find("button.edit").off("click").on("click", function () { edit_row(data[0]); }); $(row).find("button.delete").off("click").on("click", function () { delete_row(data[0]); }); } }); }, statusCode: { 401: function () { window.location.href = "login.php"; }} });}
- 17th Jan 2018What create a function in a extensions?Example: apiRegister( 'select.prueba()', function () { return this.iterator( 'table', function ( ctx ) { DataTable.select.init( new DataTable.Api( ctx ) ); } It is ok? and a property? thanks
- 26th Oct 2017how to create watermark in all my print pages?** Using this code watermark display in first page only.... ** customize: function ( win ) { $(win.document.body) .css( 'font-size', '10pt' ) .prepend( '<img src="assets/img/Logo.png" style="position:absolute; top:400; left:300; bottom: 1500; opacity:0.2;" />' ); $(win.document.body).find( 'table' ) .addClass( 'compact' ) .css( 'font-size', 'inherit' ); },
- 23rd Aug 2017Can I create Corda Custom Data Tables?Node and Vault tables created every time when I
- 9th Mar 2017How can we create multi value search for specific column using datatable?I have added multi select dropdown instead of search text box and i want to search result based on checkbox selected in this dropdown. Can you plz help me?
- 16th Feb 2017How to create row Vertical sum?Example :smiley: value | Sum 1 | 1 2 | 3 3 | 6 4 | 10
- 16th Jan 2017how to create filter,search and curd opration all in form using java dao,bean,servlet?hi , this is Ravinaidu.please send that code with full examle urgently
- 14th Dec 2016How to create column headers that show a dropdown to dynamically select which columns to displayI'd like to have column headers that include both the column name, and a dropdown that would allow the user to select which columns they want to display. The means of selection would be a checkmark or a checkbox by each column name in the list. I've attached a screenshot of what I'm looking for, from another web app. If they uncheck a column name from the dropdown, that column would disappear from the table, and vice-versa. What I'm looking for involves several pieces: 1. Creating a column header that can display the dropdown list of columns to select from 2. The checkmarks persisting on the page, once selected 3. Re-rendering as soon as a column is selected or deselected from the list. (I believe this part will be simpler, once I get #1 and #2... but I could be wrong, so I'm interested in anything anyone can tell me about this as well) I've been told that DataTables can do this, but I don't see anything obvious in the DataTables documentation. (Nor in general web searches, looking for this functionality in DataTables and other tools.) Does anyone have any ideas? I appreciate any and all ideas! Thanks
- 25th Apr 2016How can I set the (pdf, excel,..) buttons to create a file from the filtered rows?Because I found a solution that used https://datatables.net/extensions/tabletools/ but this extension is retired. How should I proceed? This is a piece of my code, concerning the buttons: dom: 'Blfrtip', buttons: [ 'copyHtml5', 'excelHtml5', 'csvHtml5', 'pdfHtml5' ],
- 11th Dec 2015Create a New Button CollectionHi, I am using a button collection which is extended from built-in html5 buttons. var table = $('#myTable').DataTable({ ........ buttons: [ { extend: 'csvHtml5', title: 'My Leaves', exportOptions: { columns: [5, 6, 7, 8, 9, 10, 23, 24] } }, { extend: 'excelHtml5', title: 'My Leaves', exportOptions: { columns: [5, 6, 7, 8, 9, 10, 23, 24] } }, { extend: 'pdfHtml5', title: 'My Leaves', exportOptions: { columns: [5, 6, 7, 8, 9, 10, 23, 24] } }, { extend: 'copyHtml5', text: 'Lưu Bộ Nhớ Tạm', exportOptions: { columns: [5, 6, 7, 8, 9, 10, 23, 24] } }, { extend: 'print', text: 'In Tất Cả', title: 'My Leaves', exportOptions: { columns: [5, 6, 7, 8, 9, 10, 23, 24] } } ] ..... Now, I want to add my own collection- a new button named "Actions" and when I click on it, the "ADD, DELETE,EDIT" buttons will be shown down. Please help me to do that. Many thanks.