Button to allow only one column to be edited for multi-row

Button to allow only one column to be edited for multi-row

jobloggsjobloggs 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.

  1. select the "Select Column" button
  2. search on the word "test" (this gives me 5 results)
  3. selecting the column "Category"
  4. Now I want to be able to edit those records and ONLY update the Category for them.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    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() and hide() can be used to hide the other fields) and then edit() to trigger editing on the selected rows.

    Allan

This discussion has been closed.