Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Friday, February 15, 2008

How to show and hide CalendarExtender and CollapsiblePanel

Here is the javascript for expanding or collapsing a collapsible panel:


// Used for collapsible panels to toggle collapse or open
function CollapsiblePanelExtender_Toggle(behaviorId)
{
var behavior = $find(behaviorId);
if (behavior!=null) {
if (behavior.get_Collapsed()==false) {
try {behavior._doClose();} catch(e) { }
}else if (behavior.get_Collapsed()==true) {
try {behavior._doOpen();} catch(e) { }
}
}
}
// Used for calendar extenders to toggle show or hide
function CalendarExtender_Toggle(behaviorId) {
var behavior = $find(behaviorId);
if (behavior!=null) {
if (behavior._isOpen==true) {
try {behavior.hide();} catch(e) { }
}else if (behavior._isOpen==false) {
try {behavior.show();} catch(e) { }
}
}
}
The Calendar show and hide behavior is above. Note: it may be helpful to use an empty label/image for the calendarExtender popupcontrolId to manage show/hide behavior.

3 comments:

Anonymous said...

male enhancement products that really works for you visit http://www.male-sexual.com

Anonymous said...

As a Newbie, I am always searching online for articles that can help me. Thank you Wow! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?.

sbobet said...

Hiya, I’m really glad I have found this information.
A good web site with exciting content, this makes me can learn more and getting new experience on the cyber world .