Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
Bootstrap DataTable: Disable sorting in one specific column, but only front-end

The website:

Part of my code:

function listaProjetos(){
  $('#datatable').DataTable({
        ///////////////     
        "columnDefs": [
            { "orderData": 1, "targets": 0 },
            { "orderData": [2, 1], "targets": 1 },
        ],      
        ///////////////

Basically, I need to change the column AÇÃO, to remove the arrows, and remove the function where clicking on the name will will sort the table.

However, I can't use the function:

{ "orderable": false, "targets": 2 }

I tried to use this to make the column "AÇÃO" not have an arrow anymore, but that meant the function { "orderData": [2, 1], "targets": 1 }, stops working, because column 1 needs column 2 to work.

There is another way to make sure only the first two columns will be sortable? Will I have to use CSS?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda