473,394 Members | 1,865 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,394 software developers and data experts.

Asp.net AJAX Nested Accordian

15
Hello... I want to make nested accordian with the help of AJAX ACCORDIAN control. Please help...... Thank you.
Apr 1 '09 #1
3 5269
tlhintoq
3,525 Expert 2GB
The Bytes volunteers are not here to write your code for you.
Bytes is very much a "Give me a fish I eat for a day. Teach me to fish I eat for a lifetime" kind of place. Just giving you the code doesn't help you learn near as effectively as good old-fashioned trial and error.

Do a little reading up and experimenting then if your trials aren't doing what you expect, post the code and relevant messages/errors and we'll see what we can do to point you in the right direction for making it work.

Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.

You need to take it upon yourself to
  • First: Do some research. I heard about thing thing called Google, or books even.
  • Second: Do some experiments yourself. You will learn so much from actually trying it before throwing up your hands in defeat before even starting.
  • Third: Show the volunteers here the code that you created that was the closest to successful along with relevant errors.
Apr 1 '09 #2
Frinavale
9,735 Expert Mod 8TB
You may want to check out the AjaxControlToolkit Accordion Examples and Documentation for help first.

If you run into problems after trying to accomplish what you're trying to do, feel free to post about your specific issue.

-Frinny
Apr 2 '09 #3
I need to do a similar thing, but I'm new to accordions and fairly new to C# and i'm having problems. I'm trying to dynamically add a pane to an accordion and the pane is to contain an accordion. It's not appearing as an accordion though. Any help would be great.

My aspx:
Expand|Select|Wrap|Line Numbers
  1.         No Of Projects: <asp:TextBox ID="numberOfProjects" runat="server" ontextchanged="numberOfProjects_TextChanged" AutoPostBack="true"></asp:TextBox>
  2.  
  3.         <asp:Accordion ID="projects" runat="server" AutoSize="None" SelectedIndex="0">
  4.             <Panes>
  5.                 <asp:AccordionPane ID="project1" runat="server">
  6.                     <Header>Project 1</Header>
  7.                     <Content>
  8.                         <asp:Accordion ID="project1Units" CssClass="accordion" HeaderCssClass="accordionHeader"
  9.                             HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
  10.                             runat="server" AutoSize="None" SelectedIndex="0" RequireOpenedPane="false">
  11.                             <Panes>
  12.                                 <asp:AccordionPane ID="project1Unit1" runat="server">
  13.                                     <Header>Project 1/Unit 1</Header>
  14.                                     <Content>
  15.                                         Unit Ref: <asp:TextBox ID="project1Unit1UnitRef" runat="server"></asp:TextBox>
  16.                                     </Content>
  17.                                 </asp:AccordionPane>
  18.                            </Panes>
  19.                         </asp:Accordion>         
  20.                     </Content>
  21.                 </asp:AccordionPane>
  22.            </Panes>
  23.         </asp:Accordion>         
  24.  
  25. My code behind:
  26.         Int32 number = Convert.ToInt32(numberOfProjects.Text);
  27.         if (number > 1)
  28.         {
  29.             for (int i = 1; i < number; i++)
  30.             {
  31.                 string headerText = "Project " + Convert.ToString(i + 1);
  32.                 AjaxControlToolkit.AccordionPane newAccordion = new AjaxControlToolkit.AccordionPane();
  33.                 newAccordion.HeaderContainer.Controls.Add(new LiteralControl(headerText));
  34.  
  35.                 AjaxControlToolkit.Accordion units = new AjaxControlToolkit.Accordion();
  36.                 units.ID = "project" + Convert.ToString(i + 1) + "Units";
  37.                 //add pane with header and content of unit ref textbox
  38.                 AjaxControlToolkit.AccordionPane unit1 = new AjaxControlToolkit.AccordionPane();
  39.                 unit1.ID = "project" + Convert.ToString(i + 1) + "Unit1";
  40.                 unit1.HeaderContainer.Controls.Add(new LiteralControl(headerText + "/Unit 1"));
  41.                 unit1.ContentContainer.Controls.Add(new LiteralControl("Unit ref: "));
  42.                 TextBox unitRef = new TextBox();
  43.                 unitRef.ID = unit1.ID + "UnitRef";
  44.                 unit1.ContentContainer.Controls.Add(unitRef);
  45.                 units.Panes.Add(unit1);
  46.                 newAccordion.ContentContainer.Controls.Add(units);
  47.  
  48.                 projects.Panes.Add(newAccordion);
  49.             }
  50.         }
  51.     }
Feb 24 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David Shorthouse | last post by:
Hello folks, I just started thinking about a db-driven, 3-tier nested option menu in AJAX instead of the typical onchange --> post. I seem to have something working, but the resultant formatting...
1
by: steve.chambers | last post by:
Is it possible to do this? Does AJAX allow one call to be made within another?? So far I'm having problems. Below I've tried to simplify my code into its basic elements - the problem I'm getting is...
3
by: samikrc | last post by:
Hello, I have an accordion (using the Rico framework at www.openrico.org) and each tab of the accordion is basically some sort of wizard (having a description and a 'Start' button in each tab). When...
4
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I am just stating to use ajax, and have a perfect place to use the accordion control. I have it working fine, but need to have a normal asp button in one of the panes that fires an onclick event...
3
by: dhsieh | last post by:
I am trying out nested AJAX calls for the first time, but I seem to have hit a snag. The code snippet is the outer AJAX call and a function, it gathers information about a company. As we get towards...
3
by: NetWave | last post by:
Hi, For my next project I'm going to need Ajax, so I'm in about to read some books on ASP.NET Ajax. While reading Rick Strahl's blog I stumbled upon jQuery. I've been to the website and seen...
4
by: ameshkin | last post by:
Hi Everybody, I'm just now learning javascript and I'm using mootools. What I want to do is to dynamically load a php page into accordian panel 2, depending on which radio button is selected in...
8
by: Tomasz J | last post by:
Hello developers, After migrating my web project application (using the old model) to .Net Framework 3.5 and Ajax Control Toolkit release 20820 the Accordion control no longer works correctly....
1
by: E11esar | last post by:
Hi there. I have created an asp.net page with C# and have added two tabs using the respective AJAX control. I am trying to add a table within an AJAX Accordion control in the second tab but I am...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.