Hello everybody, How i can get this attribute
When and how do you want to use it?
Some init option callbacks like initComplete can provide the JSON data. You can use ajax.json() to get the JSON data.
initComplete
ajax.json()
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 the producers_ids values when you want to use them.
producers_ids
Okay thanks, I will try it
It looks like you're new here. If you want to get involved, click one of these buttons!
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