DataTables does not show correct number of total entries
DataTables does not show correct number of total entries
Hi @all,
I'm completely new to dataTable and facing an issue.
I'm using the POCO libary and metroUI + dataTables plugin.
Table is generated via POCO:
` <form method="post">
<table class="dataTable table striped hovered cell-hovered border bordered" data-role="datatable" data-searching="true" data-paging="false" data-serverSide="false" id="item_table">
<thead>
<tr>
<th><%= i18l("chead_items_ID") %></th>
<th><%= i18l("chead_items_product") %></th>
<th><%= i18l("chead_items_portion") %></th>
<th><%= i18l("chead_items_price") %></th>
<th><%= i18l("chead_prod_Volume_Unit") %></th>
<th></th>
</tr>
</thead>
<tbody>
<%
int c = 0;
for(DBO_ExtendedItemsConfigTuple_Collection::const_iterator itemIt = tuple_current_items.begin(); itemIt != tuple_current_items.end(); ++itemIt)
{
c++;
const DBO_ExtendedItemsConfigTuple& item = *itemIt;
%>
<tr style="text-align: center" id="item<%= c %>">
<td id="Current_Row_Id" name="Current_Row_Id" style="text-align: center"><%= htmlspecialchars(item.get<0>()) %></td>
<td id="Current_Row_Product" name="Current_Row_Product"><%= item.get<1>() %></td>
<td id="Current_Row_Portion" name="Current_Row_Portion" style="text-align: center"><%= item.get<2>() %></td>
<td id="Current_Row_Price" name="Current_Row_Price" style="text-align: center"><%= formatDecimal((Int64)(item.get<3>()), _cfg_dec_sep) %></td>
<td id="Current_Volume_Unit" name="Current_Volume_Unit" style="text-align: center"><%= htmlspecialchars(item.get<4>()) %></td>
<td class="btn">
<form method="post" action="#">
<input name="fd_edit_id" value="<%= htmlspecialchars(item.get<0>()) %>" type="hidden">
<div id="rowform_normal<%= c %>" style="display:block;">
<input class="button" name="submit_edit_item" value="edit" type="submit">
<input class="button" name="submit_delete_item_notreally" value="delete" type="submit" onclick="return showDelete('item', <%= c %>);">
</div>
<div id="rowform_delete<%= c %>" style="display:none;">
Really delete?<br /><br />
<input class="button danger block-shadow-danger" name="submit_delete_item" value="delete" type="submit">
<input class="button" name="cancel_submit_delete_item" value="cancel" type="submit" onclick="return cancelDelete('item', <%= c %>);">
</div>
</form>
</td>
</tr>`
The sqlite database has 981 entries for the table "items" but unfortuntely when the table is loaded with dataTables plugin only between 187 and 194 entries are shown in the totals. When i initially load the table all entries are shown but the total count is still wrong. As soon as i start to do filtering/sorting, etc. the table is immediately reduced to the wrong smaller number.
Any ideas what causes this issue?
Thx in advance,
Harry