Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

173
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda