0
deltavision created
Hi,
how can I render two data fields into one column - this code gives med "undefined undefined"
var dataTable = _$customersTable.DataTable({
paging: true,
serverSide: true,
processing: true,
listAction: {
ajaxFunction: _customerService.getCustomers,
.....
{
targets: 5,
data: "addressStreet",
render: function (record) {
return record.addressStreet + " " + record.addressNumber;
}
3 Answer(s)
-
0
Looking at the content using console.log(record)?
-
0
Hi,
record is just the variable/placeholder for the addressStreet data. I contains the value from there.
So what I need is somehow to get the record/row element from the datatable.
/Michael
-
1
Hi again
sometimes looking into the documentation helps ;-)
https://datatables.net/reference/option/columns.render
This works:
{ targets: 6, data: "addressStreet", render: function (data, type, row, meta) { return row.addressStreet + " " + row.addressNumber; }
Thank you for input. Closing this case
/Michael