Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
How to disable the DataTables dropdown option?

I have the following DataTables Editor constructed.

var editor;
 
$(document).ready(function() {
    editor = new $.fn.dataTable.Editor( {
        ajax: "../php/data.php",
        table: "#example",
        fields: [ {
                label: "User:",
                name:  "user"
            }, {
                label: "User Data:",
                name:  "selections",
                type:  "select",
                options: [
                    { label: "abc", value: "abc" },
                    { label: "xyz", value: "xyz" },
                    { label: "pqr", value: "pqr" },
                    { label: "def", value: "def" },
                    { label: "lmn", value: "lmn" }
                ]
            }
        ]
    });
});

Now I want to disable the select options with values 'pqr' and 'lmn'. It should mean that users are able to see this options but they cannot select it. I tried using $("select option[selections='pqr']").prop('disabled',true); But it didn't work for me.

Is there an inbuilt DataTables property through which I can do this? Or any other way?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!