blockEvent
temporarily blocks triggering of ALL events of the calling object
function blockEvent(): void
Example
Section titled “Example”grid.blockEvent();grid.add({ text:'abc'}); //will not trigger grid eventsgrid.unblockEvent();
Details
Section titled “Details”Use the command with care, many actions in components are linked through events.
The most common use-case - preventing a component from repainting with each small operation:
//will repaint component 3 times
grid.add({ text:'111'});grid.add({ text:'222'});grid.add({ text:'333'});
//will repaint component only oncegrid.data.blockEvent();grid.add({ text:'111'});grid.add({ text:'222'});grid.add({ text:'333'});grid.data.unblockEvent();grid.refresh();
See also
Section titled “See also”Articles
API