views:

1204

answers:

2

I'm using CollapsiblePanelExtender from AjaxControlToolkit, it works fine when i click on it, but it won't expand all the way on the initial page load (expands about 90%).

I have to collapse it and expand it back manually for it to open up all the way.

I don't have the ExpandedSize property set, because the panel content is dynamic.

Any ideas?

A: 

Try to set the value of "min-height" in the style of the actual panel. Otherwise you can programmatically set the height or the ExpandSize in the PreRender event

protected override void OnPreRender(EventArgs e)
{
    base.OnPreRender(e);
    // Set the size here
    myCollapsiblePanelExtender.ExpandedSize = sizeValue;
}
Nikos Steiakakis
the size of the panel varies based on its contents
roman m
A: 

Use the following style on the target of the extender:

.collapsiblePanelContainer {
  height: 0;
  overflow: hidden;
}

The CollapsiblePanelExtender will take care of the rest of the work.

This tip is mentioned by Joe Stagner in the CollapsiblePanelExtender video.

Jim H.