Please any could help me like realising a pagination with datagrid since as a result of a query I can have up to 1000 registries, but I only want to show of 20 in 20
This was exactly my thirst question when I started to use Wavemaker:
Please be aware that this was a sample for v3.2 but it gives you an idea.
Studio Version 6.6.0 Release /GIT
Wavemaker to the max,
powered by Dojo-Tools
this example is using serviceVariable. Anyone was able to do the same with LiveVariable ?
While this project does upgrade to 4.0 for the most part, we will post a v4 version of this project directly. It will be better. Thank you.
Dharamang has put an example of paging in v4 together, attached.
In doing such, we found that the dataSetSize property is not being correctly returned. MAV-2013 has been filed for that. The attached example therefore will 'run over the edge' of the data set, trying to display rows beyond the count of the data set. This project will be updated when MAV-2013 is fixed.
Custom HQL queries or stored procedures could be used to select a row count as a workaround.
In the meantime, the attached example should be helpful.
Here is an earlier thread in which Mavirocco sorted out the HQL for row counts.
I have little question regarding the Paginationv4 project.
How does the dataGrid1 get filled automatically by the getCustomerVar liveVariable, where his dataset is bind to getCustomerByPageVar Service Variable.
The Service variable is set to get data from the custom query calling only Customer table. Where the Datagrid is able to auto get his columns from the liveView defined in the liveVariable.
Your right, the liveview and livevariable do not appear to be adding any value in this project.
The dataGrid1 is bound to the getCustomerByPageVar and not using the data returned from the liveView at all.