PDA

View Full Version : Grid - Hiding



TiVoShane
15 Oct 2007, 5:22 AM
I have a site with a menu on the left and I wanted to display a Grid when the user clicks on a menu selection. I have the grid wrapped into a DIV and I load everything up using the Ext.OnReady event. However, I don't want the grid visible when the main page shows up, I just want it visible when the user clicks on a menu link. How do I hide/show it? There is no setVisible method for the grid.


<div id="idUserDisplay"</div>




grid = new Ext.grid.EditorGrid('idUserDisplay',{
ds:store,
frame:true,
autoExpandColumn:5,
cm:cm
});



grid.render();

TiVoShane
15 Oct 2007, 10:07 AM
OK, for some reason I thought that setting the div style.display='none' didn't work but it turns out it does.

I can use that as a solution.
Thanks

TiVoShane
15 Oct 2007, 12:24 PM
Even though no one else seems interested in this question I'd like to add another comment/question.

Why doesn't setting the DIVs style.visibility = 'hidden' hide the Grid? I would think that that should work but it doesn't