I think the last_page represents the last number you can click in the table. If I set last_page to 15 I can navigate up to 15.
So as you said earlier
I have to get the total rows from the database, do the calculation and write it to last_page
I think the last_page represents the last number you can click in the table. If I set last_page to 15 I can navigate up to 15.
So as you said earlier
I have to get the total rows from the database, do the calculation and write it to last_page
you can chain the nodes, first do a query like select count(*) from yourtable
, and use a change node to set to some total
property and use that for calculations and from there create the new query
It's finally working. Thanks for all your effort! (And very sorry for the little dispute)
A little summary for everybody who is interested:
The flow
Every node from left to right (except database):
And the code of the table(inside template node):
<script type="text/javascript" src="/tabulator-tables/dist/js/tabulator.min.js"></script>
<link rel="stylesheet" href="/tabulator-tables/dist/css/tabulator_semanticui.min.css" />
<div id="table-messungen"></div>
<script>
var tableM = new Tabulator("#table-messungen", {
height:"1000px",
placeholder:"Keine Daten verfĂźgbar!",
layout:"fitColumns",
pagination:true,
paginationMode:"remote",
//groupBy:"Zeitstempel",
//groupToggleElement:"header",
ajaxURL:"http://10.207.48.36:1880/fetchmessungen",
paginationSize:1000,
/*
initialSort:[
{column:"Zeitstempel", dir:"asc"},
],
*/
columns:[
{title:"Register", field:"Register", width:150},
{title:"Druck (Pascal)", field:"Druck"},
{title:"Zeitstempel", field:"Zeitstempel"},
],
});
</script>
Nice
Now just for a hint, you can now also create your own webpage, by adding a normal template node (non-UI) with the html/javascript/css code -> response node and then opening the url in a new tab
I use this setup a lot to create custom API interfaces / pages.
Thats cool! Thanks a lot!
You were right, your solution was the better one
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.