ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: juroinstruments on November 09, 2021, 01:46:51 pm
-
I'm using the "options.collapsible.on=true" option to collapse the grid.
I have two questions.
1. Can the user define and make it work as a designated icon rather than the "jq-ui" icon at a specific location outside the grid, and if possible, can the folding height be completely or a user-specified size rather than the icon size?
2. As a result of analyzing the source, "pqGrid:collapse" and "pqGrid:expand" are used as event names. Can the user subscribe to the event before or after?
-
1. yes it can be controlled programmatically with collapse and expand methods.
https://paramquery.com/pro/api#method-collapse
https://paramquery.com/pro/api#method-expand
folding height is not configurable.
2. Events are fired after collapse / expand is complete.
-
2. Events are fired after collapse / expand is complete. <= not working
grid.collapse();
grid.expand();
from api guide : https://paramquery.com/pro/api77#event-complete
=> complete( event, ui ) Type: pqGrid:complete
=> Triggered when grid has completed data binding and view rendering. This event is generated once for each call to refreshDataAndView method.
is Right?
just collapse and expand..
-
collapse and expand events are not related to and are separate from complete event.
Could you please share a jsfiddle of what you are trying to do.
-
There is a misunderstanding when using Google Translate.
your answer =>
I am in pqgrid
To subscribe (override) the "complete" event.
It is difficult to show the related code in jsfiddle as it is not yet implemented.
---------
Just what I want is how can I subscribe to the [pqGrid:collapse,pqGrid:expand] event?
call grid.collapse() or
call grid.expand();
or
When the Collapse/Expand icon is clicked.
I wish I could see the example code.
-
There is common syntax to subscribe to any grid event irrespective of the event name.
https://paramquery.com/pro/tutorial#topic-events
grid.on('collapse', function(){
alert('collapsed');
})
grid.on('expand', function(){
alert('expanded');
})
Example: https://stackblitz.com/edit/paramquery-demo-odghqo
-
Thank you. It works fine.