cancel
Showing results for 
Search instead for 
Did you mean: 

How to Hide / Unhide iGrid Applet

Former Member
0 Kudos

I'm attempting to develop an irpt page which will feature two grids / applets. The topmost grid will be visible upon initial load of the page. Upon selecting a record from the top grid, I'd like to then unhide the bottom grid so that a user may select a row from it before then calling another page.

I've tried all of the following methods to hide / unhide the grid but none appear to be working:

1) Set the style.display of the applet to 'none' and then set it to 'inline' after row selection of the top grid.

2) Set the column widths of the bottom iGrid to 0 and then use the document.iGrid-applet.ColumnWidths=x,y JS command after row selection of the top grid.

3) Set the initial width of the iGrid applet to 1 X 1 and then use the document.getElementById("applet-iGrid").style.width / height = 'xxxpx' after row selection of the top grid.

None of these solutions work. It appears that once the iGrid applet is loaded, none of these properties may then be utilized to change it's appearance.

How can hide upon load and then subsequently unhide an iGrid applet??

Thanks in advance,

Randy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Define your grid applet within a div tag, That ways you can hide/unhide your div to achieve the desired result.

Edited by: Udayan Upreti on Aug 1, 2008 12:51 PM

Former Member
0 Kudos

Thanks Udayan - this worked.

Only other tidbit was that it appears you first have to set the style display to inline in the div tag (to ensure all subsequent object references to the grid are valid).

Then in the function called by the update event of your top iGrid applet, you have to hide the bottom iGrid/applet with the style="display:none" command.

Then in the function called by the selection event of your top iGrid applet, you have to unhide the bottom iGrid/applet with the style="display:inline" command.

This ensures the applet is first displayed (so that all references to the grid object are valid), hide it when the first (top) grid is displayed, and then unhide it when a row is selected from the first (top) grid.

Thanks again,

Randy

jcgood25
Active Contributor
0 Kudos

Randy,

Have you considered just setting the InitialUpdate="false" for your lower iGrid and when you want to present the items to the user for selection, call the .updateGrid(true) method to run the query? Simple javascript can easily prevent the user from doing something in haste, without all of the hiding/revealing.

A borderless iFrame with "about:blank" would also a clean way to control your real-estate without using applets in divs, which always has quirks with varying versions of IE and the plug-in.

Regards,

Jeremy