Button to allow only one column to be edited for multi-row
Button to allow only one column to be edited for multi-row
jobloggs
Posts: 8Questions: 3Answers: 0
"selectColumns" looks like a function I would like to use.
http://datatables.cullis.com.au/examples/advanced/testdeepObjects.html
On this datatable i'm displaying multiple columns with New, Edit and Delete buttons. I'd like the selectColumns button to modify the "Category" field only.
Is this possible?
To explain what I'm trying to achieve, here are the steps I'm following.
- select the "Select Column" button
- search on the word "test" (this gives me 5 results)
- selecting the column "Category"
- Now I want to be able to edit those records and ONLY update the Category for them.
This discussion has been closed.
Answers
Yes - absolutely possible using Editor's multi-row editing abilities.
You would need to filter the table using
search()
for step 2 (most likely - you could filter the rows outside of the DataTable if you require). For step 3 you'd need to know which field each column represents so you can trigger editing for that field (show()
andhide()
can be used to hide the other fields) and thenedit()
to trigger editing on the selected rows.Allan