Get Free Trial
API reference
Table of contents

beforegriddraw

[starting from version: 2.4]

It is triggered before grid rendering.

The beforegriddraw event will be triggered as many times as the grid is redrawn. Grid rendering can occur several times depending on the amount of data to be shown.

To know when rendering is finished, use the aftergriddraw event.

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.
    If beforegriddraw is called with smooth: false, it means that grid draw with row/column scroll is starting.
    If beforegriddraw is called with smooth: true, 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

aftergriddraw