Search
23531 results 2691-2700
Forum
- 20th Sep 2020Switch two column's visibility with one clickYes. Use column().visible(). Just modify the example a bit to specify the column, like this: table.column( 2 ).visible( ! table.column( 2 ).visible() ); table.column( 3 ).visible( ! table.column( 3 ).visible() ); KEvin
- 20th Sep 2020How do I trigger the ajax to server-side call please after hiding/unhiding columns?Ohhh; brilliant! That also solves my column filtering issue. This is what I am now doing: "ajax":{ url : 'YouthMemberAdminListView', data : function (d){ d.ssAccountLevel = sessionStorage.getItem('ssAccountLevel'); d.ssAccountID = sessionStorage.getItem('ssAccountID'); d.ssArchived = sessionStorage.getItem('ssArchived'); d.ssGroupSection = sessionStorage.getItem('ssGroupSection'); d.filterSurname = filterSurname; d.filterFirstName = filterFirstName; d.filterBOB = filterBOB; d.filterGender = filterGender; d.filterNumber = filterNumber; d.filterStart = filterStart; d.filterInvested = filterInvested; d.filterNotBirthday = filterNotBirthday; }, With many thanks and kind regards, Glyn
- 18th Sep 2020How to toggle between hiding rows based on a column's content.There's a lot of mistakes in that fiddle - it's not running, plus you're only adding one column back into the table. Kevin's example from this thread may help - it's hiding rows with black cells. You could modify that for your use case. Colin
- 28th Aug 2020want to compare two columns values bigger blue small redUse createdRow if the data is static or rowCallback if the data can change. The docs have some example code plus a running example here. Kevin
- 5th Aug 2020Columns sorting issue in datatables with php CRUDhttp://live.datatables.net/
- 10th Jul 2020Is there an option to let users resize columns by dragging the vertical border lines?thx Colin, I'll take a look...
- 18th Jun 2020DTFC_LeftBodyLiner & DTFC_LeftBodyWrapper width difference cause fixed columns misalignmentWe'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. Cheers, Colin
- 6th Jun 2020add class to individual columnsUse createdCell or createdRow. If the data can change then use rowCallback instead. Kevin
- 5th Jun 2020classes not replicated when columns are foldedThat is correct and expected. We do not currently copy across the classes that were added externally. If that is something you want to do you'd need to use either a custom renderer, or probably easier, use responsive-display to modify the display elements when the details information is shown. Allan
- 27th May 2020Multi-item editing - How to limit selectable (and editable) columns?I just want to add to this to help someone in the future. The method I mentioned of not defining the non-editable fields in the editor instance is not the correct way to go about it. There is the readonly field type which should be used instead. And if necessary, you can use fields.submit to prevent the field from being passed for update. Example: editor = new $.fn.dataTable.Editor( { table: "#example", fields: [ { label: "Name:", name: "name" }, { label: "Position:", name: "position" }, { label: "Office:", name: "office" }, { label: "Age:", name: "age" }, { label: "Start date:", name: "start_date", type: "datetime" }, { label: "Salary:", name: "salary", type: 'readonly', submit: false /* Optional */ } ], formOptions: { main: { scope: 'cell' // Allow multi-row editing with cell selection } } } );