Search
3039 results 651-660
Forum
- 30th Nov 2019how can I get the depot number against checkbox selectedYour code confuses me a little ... Looks like you are not really using the built-in features of Editor and Data Tables a lot. You want to be able to select a number of rows and then do something with the selected rows. For that reason you want to put the ids (or something else?) of these rows into a string. Ok, I have something similar. I am using Data Tables Select extension which is really valuable here and "on select" of one or multiple rows I fill an array of something with more values if they aren't in the array yet. That should be pretty much the same as you would require, I guess. So this is part of the data table definition. Including the settings for the select extension (style: 'os' etc.) and the "on select" event handler that fills my two arrays with data from the selected data table rows. https://datatables.net/extensions/select/ var acctSystems = []; var acctSystemProviders = []; var table = $('#table').DataTable( { dom: "Bfrltip", ajax: { url: 'actions.php?action=whatever' }, columns: [ ................... { data: "table.acct_system" }, { data: "table.acct_system_provider" }, .......... ], select: { style: 'os', selector: 'td:not(:first-child)' // no row selection on first column }, buttons: [ {extend: "editSettings", editor: someEditor}, "selectAll", "colvis" ] } ); table.on ( 'select', function (e, dt, type, indexes) { acctSystems = []; acctSystemProviders = []; dt.rows({ selected: true }).every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); if ( acctSystems.indexOf(data.table.acct_system) < 0 ) { acctSystems.push(data.table.acct_system); } if ( acctSystemProviders.indexOf(data.table.acct_system_provider) < 0 ) { acctSystemProviders.push(data.table.acct_system_provider); } }); })
- 10th Oct 2019Dropdown multiselect checkbox filterHi @maxamity , Your fiddle doesn't work, it's missing jQuery. This thread should help, it's asking the same thing. Cheers, Colin
- 27th Sep 2019page by page checkbox state saveHi @SweetAnonymous , Yep, they will remain selected - see my example from this thread. Cheers, Colin
- 18th Sep 2019Hi, I have a datatable with checkbox, I want to send an MVC controller, but it doesn't recognize thHi @ocardonac3 , That's a lot of code there. Can you give more details, please, such as any errors you're seeing, or what exactly "doesn't recognise the th"? Can you also link to a page showing the issue, please. Cheers, Colin
- 6th Sep 2019When using checkbox in data table,I want to get the previous select checkbox value after search,i mWithout seeing what you are doing it will be hard to offer suggestions. Please post a link to your page or a test case replicating the issue. https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case Kevin
- 1st Aug 2019How can I update datatables data using the checkbox?@colin, Thank you for your answer. But I'm working this in the server-side.
- 28th Nov 2018Datatable checkbox issuesHi @unknowndevelopper , We'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
- 17th Oct 2018Does the bootstrap4 checkbox also include a copy of PopperJS?Only the Bootstrap JS as DataTables doesn't use Bootstrap 4 tooltips. If you need the tooltips as well you could include Popper from CDNJS or similar. Allan
- 10th Oct 2018take checkbox state from different Datatable pagesWe're happy to take a look, but could you link to your page or a generate a test case so we can offer some help. 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
- 12th Jun 2018Checkbox Filtering as And-OperatorHi Colin, I don't know what to say.... I'm speechless. Thank you so much for your help. That's great!! Cheers, NIklas