Grid load.then problem

Hi, i’m using the grid and i need to do something after data loaded in.
I’ve used this syntax : “grid_mail.data.load(“load_grid.php”).then(function(){});” but doesn’t work, the operation in “then” function is not executed after the data is loaded.
I’ve tried also “grid_mail.events.on(“Load”,function(){”, but doesn’t work, the only way is to add a setTimeout(function(){ and set a MAYBE execution time of the script.
Where is my fault?

Please, try to use the load event of the data collection:
https://docs.dhtmlx.com/suite/data_collection__load_event.html