Hello;
In metronic_v6.0.6 datatables, I want to get all row Ids, but I couldn't find a way. I can read this when all rows selected. I want to do the same even if no row is selected.
Thank you so far.
Note: The jQuery code I use for reading selected ones; $("#m_datatable_Orders").KTDatatable().checkbox().getSelectedId();
Hi,
You can use jquery to get data for each row.
$("#kt_datatable").find("tr").each(function() {
var row = $(this).data("obj");
console.log(row);
// find id in the row variable
});
Thank you Faizal, but this code lists only rows listed on the page. I need all the RecordIds the datatable fetched from database. For example there are 3,500 rows and we display only 50 of them. I need 3,500 Ids instead of 50.
I know Metronic datatable keeps this information on the client side, but I couldn't read it in proper way.
Hi,
If the data is being kept on the client-side, all data can be retrieved from datatable.originalDataSet
variable.
Please try to get the ID of all records from this variable.
Thanks