Access to specific datatable attribute
Access to specific datatable attribute
nizarmahroug
Posts: 3Questions: 1Answers: 0
Hello everybody,
How i can get this attribute
This discussion has been closed.
Answers
When and how do you want to use it?
Some init option callbacks like
initComplete
can provide the JSON data. You can useajax.json()
to get the JSON data.If this doesn't help please provide more details of what you are trying to do.
Kevin
Hi @kthorngren thank you for answers.
When i get the response from server for my dataTable , i set this attribute like this :
$output = array(
"draw" => $_POST['draw'],
"recordsTotal" => $this->Items_model->count_all(),
"recordsFiltered" => $this->Items_model->count_filtered(),
"data" => $data,
"producers_ids" => $total_producers_ids
);
echo json_encode($output);
whatever I will use it a parameter for an script php (specific excel export with phpExcel library , checkbox in dataTable to choice which rows to export after filter)
Sorry, I had a type in the
ajax.json()
above. Use this API to get theproducers_ids
values when you want to use them.Kevin
Okay thanks, I will try it