mardi 3 septembre 2019

What is the meaning of columns data and name to be posted to the controller from ajax

Help me understand the relation of data and name in columns: [{ data: 'name', name: 'name' }]

var main_datatable = $('#basic_materials_list').DataTable({
  processing: true,
  serverSide: true,
  lengthMenu: [
    [10, 25, 50],
    [10, 25, 50]
  ],
  ajax: '',
  columns: [{
      data: 'basic_materials.name',
      name: 'basic_materials.name'
    },
    {
      data: 'basic_materials.description',
      name: 'basic_materials.description'
    },
    {
      data: 'basic_units.name',
      name: 'basic_units.name'
    },
    {
      data: 'action',
      name: 'action',
      orderable: false,
      searchable: false
    }
  ],
});



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire