Hello @Nuno Gonçalves,
to complement @Manish Jawla 's answer, you can also use the method afterGridInit.
GridOS.ExternalAPI.afterGridInit -> adds a callback method to fire when the grid has been initialized.
So you just need to add your code inside the method:
GridOS.ExternalAPI.afterGridInit(function(){
//do things
})