Get data from selected checkbox rows

Tags: #<Tag:0x00007f8b2b1ba900>

Hi Team,

I want all the data ( Handsontable source data ) only of selected rows.

Can anyone tell how to implement this in Angular12?

Hi @sam

I’ve made a similar demo some time ago. You can see that it logs the selected cells’ values https://jsfiddle.net/qot6g248/

Hi @aleksandra_budnik,

Thanks for the reply.

I meant by selected rows is that I have added checkbox in the header of first column, and that selects/deselects all checkboxes in that column.

So, now I want the data of only those rows where checkbox is checked.

Can you please help with that.

Thanks

OK, so you want to read the data from the row with the checkbox selected.

So I recommend using getDataAtRow() or getDataAtRowProp() (for object data). The custom logic that runs the data method can contain a FOR loop with the getDataAtCell() method where it checks false/true value within your checkbox column.

Thanks @aleksandra_budnik for the quick reply.

Actually I don’t want to read data from row. So the Source data that I’m providing into the handsontable, I want the same object to be passed to backend for storing into database.

I just want the data from original dataSource filtered with checkbox selected.

Hope you understood my requirement.

Thanks

I am sorry but I do not understand. You mentioned

I want all the data ( Handsontable source data ) only of selected rows.

and then that

Actually I don’t want to read data from row.

so I think that making a demo would help us here to get things started. I made a simple demo here https://jsfiddle.net/nsy80v1t/1/ with a checkbox that switches all of the checkboxes in all of the rows to true. Now please tell me what are the steps and expected result while using this demo.

Hi @aleksandra_budnik,

Thanks for the reply.

I have found the solution for my query. You can close this case.

Thank you for the update. I’m closing the ticket.