checkbox column checking from an external function.

checkbox column checking from an external function.

transporter_iitransporter_ii Posts: 1Questions: 1Answers: 0

Poked around searching and nothing is jumping out at me. I'm downloading json using Alpine.js and passing the data to a DataTables constructor, which builds the table just fine. I'm adding a checkbox column dynamically. I'm just looking for some directions I might head in here, not really actual code.

What are some options if I wanted to get another array of data, loop it, and auto-check the checkbox in the DataTable if the value exists in the DataTable?

So far, one option I have thought of is to do it all server side, adding a column that could be used with a rowcallback function to check it if needs to be checked. Then download this and let it check the checkboxes when it builds (rebuilds) the table.

But what about downloading the array of data and looping it client side to search an already drawn table?

Like I said, I did do some research on this before asking, but nothing really jumped out at me as the way to proceed. I thought maybe someone might have done something like this before that could get me headed in the right direction.

Thanks,

Answers

Sign In or Register to comment.