Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Server side, column sorting with render function

$
0
0

I suspect that the answer is right in front of me but I am having trouble trying to get my data tables to sort properly when rendering data through a function such as:
` columns: [
{data: 'work.id'},
{data: null,
render: function (data, type, row) {

                if (data.customer.cname) {
                    return data.customer.cname;
                } else {
                    return data.customer.fname + ' ' + data.customer.lname;
                }
            }`

I imagine that I should be able to append a custom sort delimiter within this function but I have not been able to succeed as of yet.
Thanks in advance.


Viewing all articles
Browse latest Browse all 2364

Trending Articles