How to get a reference to UltraWebGrid from popUp window

This is a cool trick  I guess :-).   So, this approach can be used to get a reference to any DOM element of course not only to UltraWebGrid but the current example targeting this control and more specifically  how the function can be invoked from the “opener” window. Let assume that we press a  button or a link and open a new popup window and we would like to make some operation on the popup window which needs to reflect the “opener” window, we can use code similar to this one below :

8 <script type=”text/javascript”>

9 function getMaintWindow() {

10 //Get a reference to the window

11 //that has opended the popUp window.

12 var mainWindow = window.opener;

13 //Invoke the function

14 //from the opener window

15 //in our case just find the UltraWebGrid.

16 var oGrid =

17 mainWindow.igtbl_getGridById(‘UltraWebGrid1’);

18 // Use the API of the grd to manipulate it.

19 //For example / I will hide it.

20 oGrid.hide();

21 }

22 </script>


I hope someone might find it useful somewhere.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s