Search
43891 results 6411-6420
Forum
- 16th May 2025Set Focus to Cell by Click a Button in TableHi everyone, I want to set the focus to Celle KM when clicking the plus button. Unfortunately, it doesn't work. here my code tablefzg.on('click', 'button', function (e) { let data = tablefzg.row(e.target.closest('tr')).data(); var action = this.className; let tr = e.target.closest('tr'); let row = tablefzg.row(tr); if (action=='GetFZG'){ if (this.innerHTML == '-') { this.innerHTML = "+"; fahrzeugstatus = 0; this.style.backgroundColor = '#F0F0F0'; var set = 0; $.ajax({ url: "/FOM/controllers/fzg_eintragen_einsatz.php", type: 'post', data: {dsid:data.ID,wertset:set}, success: function (data) { return data; } }) } else if (this.innerHTML == '+') { this.innerHTML = "-"; // >> Here the focus should be set on the column/cell KM << tablefzg.cell('KM').focus(); fahrzeugstatus = 1; this.style.backgroundColor = '#60c724'; var set = 1; $.ajax({ url: "/FOM/controllers/fzg_eintragen_einsatz.php", type: 'post', data: {dsid:data.ID,wertset:set}, success: function (data) { return data; } }) } } })
- 9th May 2025My Modal is showing behind my TableCan you link to a test case please? I'm afraid this sort of thing really needs a test case to be able to debug. Allan
- 21st Mar 2025Responsive table - How to customize the style of Accordion button for expand and collapseI use a CSS through the ::before pseudo element to create that triangle: table.dataTable.dtr-column > tbody > tr > td.dtr-control::before, table.dataTable.dtr-column > tbody > tr > th.dtr-control::before, table.dataTable.dtr-column > tbody > tr > td.control::before, table.dataTable.dtr-column > tbody > tr > th.control::before { } Is the full selector. Set the border-width to be 0 and then apply a background image, or content or whatever format it is that you have to display the icon you need. I'd suggest right clicking on the the element and selecting "Inspect" to see the CSS that is applied to the element. Allan
- 19th Mar 2025I cannot set a width to my first column and the other columns of the tableLink to test case: https://jsfiddle.net/thelittlewozniak/ban0jedv/3/ Debugger code (debug.datatables.net): / - No error Error messages shown: No error shown Description of problem: Hi, I have an issue with my DataTable. I tried to set a specific width for the first column named "worker," as you can see in the JSFiddle. When I set "autoWidth" to true and also set the width to "800px", the column does not get the expected size. columns: [ { title: "Travailleurs", data: "worker.name", name: "worker", editField: "worker.id", width: "800px", }, ... ] I also tried setting the width using columnDefs, but that didn’t work either: columnDefs: [ { targets: 0 , width: "800px" }, ] Am I missing something? Can someone help me understand why this is not working? I also disabled fixedColumns, fixedHeader, ScrollX, and ScrollCollapse, but the column size still does not change. Thank you for your help! :)
- 10th Mar 2025How can i enable datetime picker on a created table for specific column?Duplicate of this thread. See answer there. Kevin
- 6th Mar 2025Remove row on serverSide preserving table pagination stateThank you for responding. If you have any update pls let me know!
- 7th Feb 2025data table fails with ver 2.2.2 & new YadcfIf I correct the loading errors in the example, it appears to work for me: https://jsfiddle.net/L3mnpe57/ . The changes made: Change the location of the YADCF JS script since raw github content doesn't serve the correct mime type header for JS. Move the DataTable and jQuery script before Bootstrap (BS4 depends upon jQuery) Load jQuery-UI for the datepicker. I should note that YADCF is not created by myself and I can offer no support for it here. Allan
- 7th Feb 2025data table fails with ver 2.2.2 & new YadcfLink to test case: https://jsfiddle.net/nvrdq7kp/7/ **Debugger code: opizok (Actual real code not test case) actual code not test case: Uncaught TypeError: t is undefined n https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 t https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 jQuery 6 Ne https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 n https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 Me https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 V https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 jQuery 2 V https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 DataTable https://172.18.10.44:8443/GP-ERP/resources/theme-default/updated/js/datatables222.min.js:16 https://172.18.10.44:8443/GP-ERP/ProductController/getNewProductScreen:2660 jQuery 13 For whatever reason , i want to use datatables 2.2.2 but i also need "yadcf" or similar functionality yadcf now requires a new version https://raw.githubusercontent.com/vedmack/yadcf/refs/heads/master/2.0/jquery.dataTables.yadcf-2.0.js so, I just added in the replacement libraries but now the code causes errors. I have tried to get as close to the original code with the "test case" basically it's just a simple Datatable with ajax data & "yadcf" if i drop the: DataTables 1.13.6 jquery.dataTables.yadcf.js 0.9.4 then the thing is flawless... but if i use DataTables 2.2.2 jquery.dataTables.yadcf-2.0.js it fails just showing "loading"
- 29th Jan 2025Is it possible to configure a drop down list that will filter the table rows based on the selection?See this example. Kevin
- 15th Jan 2025How export to excel the table in DataTable with REACT?You need to tell Buttons about JSZip. See this example. Allan