get selected item value with javascript/ajax sourced data
get selected item value with javascript/ajax sourced data
t0n1zz
Posts: 32Questions: 19Answers: 0
so i have this code that use for getting value from datatable row and it works fine is my datatable source data is from DOM
var id = $.map(table.rows({ selected: true }).data(),function(item){
return item[3];
});
but after i change my datatable by using javascript/ajax sourced data, it just return nothing...
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
this works with Ajax sourced tables:
Are you using
columns.data
to tell DataTables to use object based data instead of array based? If so, you'd need to usereturn item.myProperty;
.Allan