how to add conditions on column:data?

how to add conditions on column:data?

madusankamadusanka Posts: 20Questions: 7Answers: 0
edited November 2019 in Free community support

if the are conditions true, i want to show this column, where should i check the conditions

 "columnDefs": [
                   {
                       "targets": [ 0 ],
                      "data":"id",
                       "orderable": true,
                       'render': function (data, type, row) {
                  //         return '<a href="#"   id="' + row.id +'" data-booking='+JSON.stringify(row)+' class="show-booking">'+row.booking_reference+'</a>'
                       },
                   },
]

or

 columns: [
                  { data: "booking_reference", 'render': function (data, type, row) {
                          return '<a href="#"   id="' + row.id +'" data-booking='+JSON.stringify(row)+' class="show-booking">'+row.booking_reference+'</a>'
                      },
                  },
]

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.