How to populate a specific column when using select
How to populate a specific column when using select
I'm sure what I'm asking is simple, but I've had a tough time finding a solution. I'm using the select/checkbox option for datatables, and I want to populate a column for each of the selected rows when selected. Most examples I've seen are for just when people click on a row to select, but I also have a "Select All" button, so it needs to populate this information for all selected rows in the entire table, regardless of pagination. I've got it mostly working, but the challenge is that the index reflects the original order, not the displayed order. For example, click on "S102327930.001", and it will populate the wrong row. I've seen examples using the indexOf, but again, they were all for when clicking on a single row. I'm not set on how I'm doing it, so let me know if there's a better approach.
Here's a page of a demo:
https://www.mountainlandsupply.com/sample.html
And here's the debugger link (first time using it, so hopefully I did it right):