How to modify the content of a column?

How to modify the content of a column?

ale2136ale2136 Posts: 1Questions: 1Answers: 0
edited November 2021 in DataTables

Hi, I have a question, I am currently showing a table with datatable:

<script defer >
  $(document)
  .ready(function() {
    $('table.display')
      .DataTable({
        "language": {
          "lengthMenu": "Mostrar _MENU_ registros por página",
          "zeroRecords": "No se encontraron registros - disculpa",
          "info": "Mostrando la pagina _PAGE_ de _PAGES_",
          "infoEmpty": "No records available",
          "infoFiltered": "(filtrado de _MAX_ registros totales)",
          "search": "Buscar:",
          'paginate': {
            'next': 'Siguiente',
            'previous': 'Anterior'
          }
        }
      });
  });
</script>

2 of the fields are being modified, "Estatus del stock" I add a phrase and show the percentage, and the "Precio" field, which I am formatting to show it as currency, my question is if I can show the data in the same way with json. How can I modify the fields to add phrases or to be able to format them?

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin

    I'm afraid I'm not following the question. I'm not actually seeing any JSON being loaded there?

    Allan

Sign In or Register to comment.