ReadOnly specific row in DataTable Editor

ReadOnly specific row in DataTable Editor

lupearobertlupearobert Posts: 4Questions: 1Answers: 0

Hi, I have a question regarding the datatables editor
How can I make a row read only if a condition is met
For example if one of the fields had value 3 I want the whole row to be readonly

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    You could try something like this : http://live.datatables.net/sicerace/1/edit

    Here, if the row being edited has "London" as the office, then it cannot be edited. The example needs some work if you're allowing multi-row editing, but the logic that's there would be a good starting point.

    Colin

  • lupearobertlupearobert Posts: 4Questions: 1Answers: 0
    edited April 2021

    Hi, thank you for the answer but I have already figured out how to disable the button, what I need is to disable the double-click-edits-item option.

  • allanallan Posts: 61,438Questions: 1Answers: 10,051 Site admin

    double-click-edits-item option

    Can you link me to your page showing that, or show me the code enabling that? I don't think we use double click in any of our examples do we?

    Allan

This discussion has been closed.