views:

335

answers:

1

I've programmatically added a column to a GridView for the sole purpose of adding a HoverMenuExtender and Panel to it's cells. The HoverMenuExtender displays when you hover over a row no problem.

However, there is now an extra column in my grid that I don't want there. I've tried 3 things to hide it:

1) set the column to Visible=false on the server. This doesn't work because the column will then not be rendered, so the HoverMenuExtenders don't exist on the page.

2) set the cells of the column to visibility: hidden. This almost works, but cells still occupy the same space on the page as when they are visible(as they should with visibility).

3) set the cells of the column to display: none. This hides the column but prevents the hoverMenu from displaying for some reason.

So my question is, why does option #3 prevent the HoverMenuExtender from displaying when I hover over the row?

Wouldn't the HoverMenuExtender have to mark the popup div/panel as display:none anyway and then change that when the target is hovered over?

Any ideas would be great, I'm just curious. Thanks for reading...

A: 

From the AutisticCuckoo

Since no box is generated for an element with display:none it isn't possible to make any of its subordinate elements visible. Regard the following example:

 <div style="display:none">   
   <p style="display:block">Text</p> 
 </div>

We might think that this would make the paragraph visible, but that's not the case. Since the containing element <div> doesn't generate a box, its subordinate element <p> can't either.

chevett