473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

dynamic creation of CollapsiblePanel

Hi:

Can somebody provide me samples on how to create a dynamic
CollapsiblePanel using ASP.NET AJAX Toolkit. Any points are highly
appreciated.

Thanks,
GJM

Apr 3 '07 #1
2 4992
Sure. But can you be more specific about what you mean by dynamic, please? I
want to make sure I understand what you're saying...

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
<jm****@gmail.comwrote in message
news:11**********************@n76g2000hsh.googlegr oups.com...
Hi:

Can somebody provide me samples on how to create a dynamic
CollapsiblePanel using ASP.NET AJAX Toolkit. Any points are highly
appreciated.

Thanks,
GJM

Apr 3 '07 #2
Here is what I use to create a collapsible panel dynamically. It's a function that takes in two other asp panels--one for the header and one for the content. the only thing this function needs knowledge of is the ID of the button used for the ImageControlID. You can probably do something to make it totally dynamic by looking through the controls in the header panel for an image control matching a pattern on the name.

The return from this function needs to be added to another panel that exists on the page.

private AjaxControlToolkit.CollapsiblePanelExtender PopulateCollapsiblePanel(Panel headerPanel, Panel bodyPanel)
{
collapsiblePan = new CollapsiblePanelExtender();
collapsiblePan.ExpandControlID = headerPanel.UniqueID;
collapsiblePan.CollapseControlID = headerPanel.UniqueID;
collapsiblePan.TargetControlID = bodyPanel.UniqueID;
collapsiblePan.Collapsed = false;
collapsiblePan.ID = "collapsiblePan";
collapsiblePan.ExpandedText = "Click to Collapse";
collapsiblePan.CollapsedText = "Click to Expand";
collapsiblePan.ImageControlID = "controlBtn";
collapsiblePan.ExpandedImage = "~/images/collapse_blue.jpg";
collapsiblePan.CollapsedImage = "~/images/expand_blue.jpg";
collapsiblePan.EnableViewState = true;
//collapsiblePan.SuppressPostBack = true;
collapsiblePan.EnableClientState = true;
return collapsiblePan;
}

From http://www.developmentnow.com/g/8_20...siblePanel.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Jun 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Eddie de Bear | last post by:
Hi, A project I am working on has a requirement for dynamic menus. For the most part this works really well. The menus I'm creating a based on files and directories, so naturally the menu...
5
by: Tompa | last post by:
Hi, I would like to create images on the fly as a response to an http request. I can do this with PIL like this (file create_gif.py): from PIL import Image, ImageDraw print 'Status: 200 OK'...
2
by: JC | last post by:
Hello, I'm looking for examples of how to make dynamic creation of code and dynamic execution of the same code. I want to do some code dynamically and then I want to use it to get some results....
2
by: charliewest | last post by:
I need to create textboxes in real-time, the actual number of which is determine by a result from a database query. I have been able to create the controls, and then add them to the ASPX page....
2
by: Dave Williamson | last post by:
When a ASPX page is created with dynamic controls based on what the user is doing the programmer must recreate the dynamic controls again on PostBack in the Page_Load so that it's events are wired...
15
by: rwf_20 | last post by:
I just wanted to throw this up here in case anyone smarter than me has a suggestion/workaround: Problem: I have a classic producer/consumer system which accepts 'commands' from a socket and...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
13
by: rn5a | last post by:
In a shopping cart app, suppose a user has placed 5 orders, I want to show him 5 LinkButtons (one for each order) so that when he clicks the first LinkButton, he would be shown the details of his...
1
by: cdmsenthil | last post by:
I have an Infragistics UltrawebGrid . Each Row in the grid is attached to a context menu using Infragistics CSOM Upon click on the menu, I am creating an Iframe dynamically which points to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.