[starting from version: 2.4]
It is triggered before grid rendering. To know when rendering is finished use aftergriddraw
.
Data passed to the handler
params
– Object. It has the following parameter:
smooth
– Boolean. There are two types of grid draw: grid draw that adds row/column scroll and grid draw that adds pixel scroll. As a result,beforegriddraw
is called twice. The first time it is called with smooth: false
and it means that grid draw with row/column scroll is starting. The second time beforegriddraw
is called with smooth: true
and it means that grid draw with pixel scroll is starting.Examples
1) How to use beforegriddraw
:
flexmonster.on('beforegriddraw', function (e) { if (e.smooth == false) console.log('Before grid draw with row/column scroll!'); else console.log('Before grid draw with pixel scroll!'); });
Open the example on JSFiddle.
2) How to use beforegriddraw
for styling rows based on the conditional formatting: live demo.
See also