Here is how to set the properties. You might be able to read from them instead to find out:
'For Each properties As CollapsiblePanelProperties In CollapsiblePanelExtender1.TargetProperties
' properties.ClientState = "true"
' properties.Collapsed = True
'Next
I've added the following code, however p.Collapsed is always set to true regardless of if it's collapsed or not.
bool advancedSearch =false;
foreach (CollapsiblePanelProperties pin collapseAdvancedPanel.TargetProperties)
{
if(!p.Collapsed)
{
advancedSearch =true;
break;
}
}
It's possible that the value just isn't retrievable from the server side code. Sorry that my code snippet doesn't seem to work, thought it was worth a try atleast.
Thanks Motley. I thought this would have work to. Atlas Control Toolkit dev team, is this true that you cannot determine if the pannel is collapsed on the server side?
Hi DuncanFord,
Check outFAQ Item #19. If you get theCollapsiblePanelProperties for your target control, you can check itsCollapsed property to determine whether or not it's currently collapsed.
Thanks,
Ted
Thanks Ted,
I will have to try this out. Unfortunatly, I won't be able to try this out for a while because I removed the CollapsiblePanel from my project because it was preventing me releasing the current version of my project.
Cheers,
Duncan
Please can you update FAQ #19 to reflect Beta - there is now no CollapsiblePanelProperties.
[Incidentally athttp://ajax.asp.net/ajaxtoolkit/CollapsiblePanel/CollapsiblePanel.aspx Expanded Size should be in bracket]
With no CollapsiblePanelProperties anymore, how do we determine the state of a CollapsiblePanel? (expanded vs collapsed)
Thanks.
Ok, quick reply.
It looks like it can be done with code like this:
if (CollapsiblePanelExtender1.ClientState.ToString() =="false"){ BindGrid1();}
Is this the proper way to check the state?
No comments:
Post a Comment