Responsive table with select, can not get value of row
Responsive table with select, can not get value of row
Hello,
Datatables, all version and plugins are updated to latest version, 1.10.11.
I have datatable with responsive design, view works fine,
But when i tried to get values of row when i click on button, i could not get value and console shows "Uncaught TypeError: Cannot read property 'ticket_id' of undefined"
If i maximize full screen, means desktop mode can see all columns, it get correct values and page get redirected,
$('#tickets_table tbody').on( 'click', '#ticket_open', function () {
var ticket_data = table.row( $(this).parents('tr') ).data();
window.location.href = baseURL + 'agent/core/tickets/ticket_details/'+ticket_data['ticket_id'];
});
I assume when its in responsive mode, few column becomes seperate rows and it lost relation with its parent,
Am i doing something wrong?
Thanks,