I have this code below but it can only search for last_name.
I want to search for first_name, middle_name, and name_extension also, how can I do that?
Thanks!
{
`// column definitions`
`mData: 'last_name',`
`"aTargets": [ 1 ],`
`mRender:function ( data, type, row ) {`
`// concatenate name`
`return row.last_name+' '+row.name_extension+', '+row.first_name+' '+row.middle_name;`
`},`
`searchable: true,`
`sortable: true,`
`visible: true,`
},
Try this trick, add a hidden column first_name on your columns and it will be included in search.
columns: [
{data: 'first_name', visible: false},
{data: 'last_name'},
]
Thanks for your reply but still can't search for first_name.
It's working! I changed my aoColumnDefs: [] to columns: [] and mData to data and follow the that trick. Thanks!