Hello,
It's a bit hard for me to figure out why this happens, since I am not familiar with this third party OLAP control, but I would guess that the render event of the OLAP grid fires too late in the page lifecycle (e.g. in Render) and this is too late to register controls and javascript - they need to be added to the control tree prior to OnPreRender.
How many menu combinations do you have? Are they a manageable number (e.g. up to 10) - if this is the case, you can register all of them on the client and then display the one needed purely by javascript (by hooking the oncontextmenu event of the grid cell and displaying the appropriate menu there)? Or if this is too tricky, maybe you can try to hook the menus earlier in the cycle (prior to Render?)?