×
Menu
Index

2.4.12. gridrefresh

 
This is a special pagetype which can be used as a pagetype for a button. This way you can refresh the content of a grid, after a button is clicked. This can be very usefull to show different results.
 
Buttons with gridrefresh as pagetype when clicked. The grid will refresh according to the result.
 
When gridrefresh is used as pagetype for a result, it won't open a new page with a grid or a form, it will refresh the corresponding grid.
 
{
"display": "Last year:",
"tooltip": "",
"fieldname": "",
"length": 0,
"inputtype": "button",
"block": 1,
"newline": true,
"labelwidth": 4,
"fieldwidth": 2,
"fieldheight": 2,
"outline": true,
"color": "primary",
"onclick": {
"endpoint": "\/files\/detklre?key=${id}&jaar=vorig",
"pagetype": "gridrefresh",
"pagesize": "",
"refresh": "historygrid",
"buttons": [],
"onclick": {
"endpoint": "",
"pagetype": "",
"pagesize": "",
"buttons": []
}
}
},
 
 
With the gridrefresh as pagetype, you can refresh a grid on the same form. This is defined in the onclick event of the button.
 
  • endpoint: the endpoint where the request must be send.
  • pagetype: with gridrefresh there is no new grid or form opened, it will refresh an existing grid.
  • pagesize: is empty, it needs to be send.
  • refresh: name of the grid to refresh. If there are multiple grids on a from, you can define which one must be refreshed.
  • buttons: is empty, the grid already has navigation buttons.
  • onclick: must be send, but is empty. There is an onclick for the grid defined.
 
The pagetype gridrefresh can be used with the ondrop event of a button. See the element button for a sample.