Search
3647 results 301-310
Forum
- 21st Mar 2023How to copy a cell's text formatted content as showed on screen with copy buttonIf you want to use the "copyHtml5" button you would need to use "customize": https://datatables.net/reference/button/copyHtml5 If you don't want that you would need to make your own custom button. In that button you could loop through your data table and copy formatted text to your clipboard as well. You could use "navigator.clipboard.writeText()" for example. https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText You yould use "rows().every()" to loop through your datatable: https://datatables.net/reference/api/rows().every() I made a custom button that allows the user to copy a hyperlink to the selected contract to the clipboard. When clicked a confirmation popup is displayed. Just to give you an idea on how to make a custom button, if you haven't done that before. //custom button to copy a hyperlink of the selected contract to the clipboard $.fn.dataTable.ext.buttons.clipboard = { extend: 'edit', text: '', className: 'fa fa-link button-fa-icon', action: function ( e, dt, button, config ) { var txt = encodeURI(window.location.href.split('_ser_')[0] + '_ser_' + parentSerial); navigator.clipboard.writeText(txt); var msg = lang === 'de' ? 'Dieser Hyperlink zum ausgewählten Vertrag \n\ wurde in Ihre Zwischenablage kopiert:' : 'This hyperlink to the selected contract \n\ was copied to your clipboard:'; setTimeout(function(){ swal({ title: lang === 'de' ? 'Hyperlink kopiert!' : 'Hyperlink copied!', text: msg + " \n\ \n\ " + txt, customClass: 'swal-x-wide', type: '' }); }, 100) } };
- 1st Mar 2023Struggling with NVDA reading cellsAllan...I just sent an email to one of the support managers. I will keep you posted.
- 15th Feb 2023Are there any near changes planned to switch to position: sticky for fixed header/footer cells?Thanks. I am rather fond of the floating columns that stay on screen, so I will have to decide if I want to give them up and move to the official FixedColumns or maintain my own code. Either way, thanks for your work.
- 26th Dec 2022Fix for exporting cells values leading with 0s in excelSounds like a good change - thanks! Fancy sending in a pull request? Allan
- 27th Sep 2022edit cells by index arrayI solved it so: indexes.forEach(element => { dtMember.cell(element, COL_SELECT).data(CHAR_UNSELECTED); });
- 10th Sep 2022Add check box in specific cellsIt is possible. You can use columns.render to render either a checkbox or text input based on a condition. Is there a data point in the row that would determine if you want to display the checkbox? Possible you can use the row attribute of the meta parameter to determine the first two rows. This may not work if the table is sorted as the index doesn't change when sorting changes. Kevin
- 20th Apr 2022How to multiply 2 cells in row?A rendering function is what you want. Allan
- 13th Apr 2022Show/ hide rows based on a row cell's contentThanks so much, Colin! Also, my apology for duplicating my question in the forum. If possible, please delete the other identical question. Have a good day, sir!
- 13th Apr 2022Deselect cells from a selected range of table rowsTo deselect a single cell, control click on it. Or if you want to do it via the API use row().deselect() providing a suitable selector for your row to row(). Allan
- 16th Mar 2022Handling cells with more than one valueThank you so much, Colin! It's working after I figured out how to split the contents on the right character. Greatly appreciate all the work you do!