Hello Support,
We have afterInit tag in xml,which calls the method after Initialisation of Grid.
I just wonder if we have Event for after/before Initialisation of grid.
Thanks in Advance.
There is no such event , in case of initializating by js script the moments when grid initialized is clearly visible without any events. When you loading configuration from XML - the onXLE event can be used ( it will fire after incoming XML fully processed )
Basically you can add you custom event with next trick
in js code
grid.my_event = function(){
//any code here
}
in XML
…
Thanks.
Actually I am not loading grid from xml, I used setValue method in loop to set the value.
So the suggested code is not useful in my case.
I want like this mygrid.setOnAfterGridInit(callAfterGridInit);
If you are using initialization from javascript, the key point is
grid.init();
command, after it any operation will be instantly visualized
>>I want like this mygrid.setOnAfterGridInit(callAfterGridInit);
There is no similar event , but it is pretty simple to add new one, you can locate init method in dhtmlxgrid.js and add as last line of it
this.callEvent(“onAfterGridInit”,[])
and later use
grid.attachEvent(“onAfterGridInit”,function(){
//any custom code
})