Search
43647 results 6391-6400
Forum
- 4th Dec 2024cannot destroy table when using init method on button instancesUnderstood. I would not have thought of that. Thanks
- 22nd Oct 2024Question about jQuery event delegation / Colvis / Colreorder / multiple table headersHi, I have the following problem. My datatable has multiple header lines, the second one being with column search inputs. Also, I have the Colvis and Colreorder plugins enabled. When I mousedown on a column search input, Colreorder kicks in and I can drag the column. Which is not what I want. I can disable this behaviour by registering an event handler like the following: $('input.localSearchInput').on('mousedown', function (event) { event.stopPropagation(); }); Now, the problem is, when I enable a previously invisible column with Colvis, the event handler doesn't apply to that "newly visible" column. I found out that I probably need a delegated event handler in this case: $(document).on('mousedown', 'input.localSearchInput', function (event) { event.stopPropagation(); }); The problem here is: it doesn't stop the mousedown event from propagating to Colreorder, unlike when I'm directly registering on input.localSearchInput and I do not understand why. Does anybody have an idea? Thanks a bunch in advance.
- 16th Oct 2024Is there a way to make className apply only to the table cells in a column, and not the header fieldhttps://live.datatables.net/veyasecu/1/ I'm using the className property on my columns to set the text colour of the values in the fields. But it also changes the text colour of the header field. Is there a way to apply a class to just the data fields, and leave the header field with the default text colour?
- 31st Aug 2024How to Save colreoder in Database TableState saving the column order, even after they are reordered seems to work in this example. Maybe I'm not understanding the problem statement. If you want to change the default behavior of how the states are saved/loaded then use stateSaveCallback and stateLoadCallback. Kevin
- 10th Jul 2024DataTable.destroy does not remove checkbox from table headerGreat, thanks for the quick response!
- 10th Jul 2024How to add read more or less button in table column?Here are a few options that may be useful - this example from this thread, and this example from this thread. Both hide the long string with ellipsis, with the full string shown as a tooltip, which are then expanded when clicked upon. Colin
- 6th Jul 2024In the data table Excel, column area of 9 or more is not applicableWe're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here. Colin
- 25th Jun 2024When the table is rendered, only the first letter of the column is displayed in the table.You need an array of rows where each row is either an array of columns or objects. See the Data docs for details. Updated test case: https://live.datatables.net/yofinibo/2/edit Kevin
- 22nd May 2024how to resize column of table and with respect to maximum content of orYou can try column.width to define the column width. You didn't provide any details about the problem you are having so its difficult to guess what the answer might be. PLease provide a link to your page or test case showing the issue you are having so we can offer suggestions. https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case Kevin
- 16th May 2024Update input values inside responsive tableAlso, make sure you are using the listHiddenNodes renderer, so the elements are moved around rather than cloned (which would loose the value). Failing that, then, as Kevin says (and the forum rules state), we'd need a test case showing the issue. Allan