Wednesday, March 21, 2012

Need help using CollapsiblePanel

I tried looking at the sample website page and doing a search on the forums here.

I created a panel, put the panel in an updatepanel. but the collapsiblepanelextender inside the updatepanel as well. I set some overflow:hidden value on the style of the panel.

I load the page, I see the panel, then eventually it goes away, ok well that sucks anyway.

now what? I tried to create a button that would collapse/expand the panel but I'm not sure how.

I'm coding in VB and I looked at the C# sample web page and don't even see how they did it. All I see is if page is not postback, set panel to false and height to 0.

How do I control the collpasing and expanding with a button or whatever?

I tried on my button click but this but didn't work.

Protected

Sub Button1_Click(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles Button1.Click
Dim TargetPanelPropertiesAs AtlasControlToolkit.CollapsiblePanelProperties = CollapsiblePanelExtender1.GetTargetProperties(AddMemberPanel)If TargetPanelProperties.Collapsed =FalseThen
TargetPanelProperties.Collapsed =True
ElseIf TargetPanelProperties.Collapsed =TrueThen
TargetPanelProperties.Collapsed =False
EndIfEndSub

Ok, I got it somewhat working. I took out the code and pointed the property some controlID to my button. Wierd thing is though,

When I click my button it shows, but when I roll-over the panel it collapses again. Also when the page first loads it doesnt' collapse until I roll over it. what the hell?


Hi Mastro,

I'm not sure what you're doing wrong from your decsription. Perhaps you could post afull code sample.

Thanks,
Ted

No comments:

Post a Comment