Finding ids of rows in selected column
Finding ids of rows in selected column
goktuginal41@gmail.com
Posts: 57Questions: 22Answers: 0
Hello everyone,
I made a design that performs crud operations on Django FW. I want to select a column and edit the values in that column all in one. I think, I need to keep the row ids of the rows in selected column within an array. Any ideas? Thank you.
This question has an accepted answers - jump to answer
Answers
If a column is selected, then you just need the row ids of all rows in the table.
rows().ids()
will do that.Allan
When I change console.log part below, I get those results. I just need to reach the dict and get the ids. I have multiple select row operation.
Result: B ["undefined"]
Result: {id: 15, p_id_s: "V3A", reception_date: "2022-07-05", hospital_date: "2022-07-15", culture: "LJ", …}
Result: B ["undefined"]
Result: 15
But it does not work for multiple select that I want to keep all ids in an array. Do you know how to fix it? Thank you.
Are you using the
rowId
option to define the column containing the id's?Looks like your data is using arrays, since you have
.pluck(0)
. Try setting therowId
to the column index forrows().ids()
to work.Kevin