473,799 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Collapsible Grid/Tree

I have a pair of database tables with a structure similar to the
following:

--------------------------------------------
Table: Category
--------------------------------------------
CategoryID | CategoryName | ParentCategoryI D

1 | 'A' | 0
2 | 'B' | 0
3 | 'AA' | 1
4 | 'AB' | 1
5 | 'BA' | 2
6 | 'BAA' | 5

-----------------------
Table: Budget
-----------------------
BudgetID | BudgetAmount

3 | $10
4 | $30
6 | $15

Hopefully it is clear that the Category table is a hierarchical tree
structure. Each Category record contains a parent ID that points to
another Category record in the same table. Categories with a parent ID
of 0 are at the top of the hierarchy, while a category that has a
non-zero parent ID is a sub-category. The categories without any
sub-categories have an associated record in the budget table. There is
no limit to how many levels deep the tree will go, and not all
categories will have the same number of levels of sub-categories.

I need to display this data as a table on a web form so that the
Categories can be expanded/collapsed to show/hide their sub-categories.
Also, when a category row is in a collapsed state, it should show the
sum of the amounts contained in its sub-categories.

I know there are 3rd party controls that can probably handle these
requirements, but it is preferred that this web form be built using
only the standard ASP.Net 2.0 controls. I've also come across a few
articles that describe nesting controls, but that's not exactly what I
want either... I don't want tables within tables, which would result in
columns that don't line up properly (there will actually be about a
dozen "amount" columns associated with each category), but just one
single table with the collapsed categories "hidden".

This seems like it would be a relatively common thing to do, but I
haven't been able to find any examples to get me started. How would you
recommend going about this? Which control would be best suited
(Repeater, DataList, DataGrid, GridView, etc)? Can the TreeView help me
at all? Would the GridView provide any benefits over the DataGrid in
this scenario? Thanks!

Feb 27 '06 #1
0 1592

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

Similar topics

6
8255
by: Richard Lewis | last post by:
Hi there, I've got a tree control in Tkinter (using the ESRF Tree module) but I can't get it to layout how I want it. I'd like to have it so that it streches north/south (anchored to the top and bottom), is of a fixed width and is anchored to the left hand side. Here's my code (its derived from one of the examples from the ESRF web site):
0
2257
by: BH | last post by:
Hi, I am trying to build my own IHM with two treeCtrl and 1 grid, based on the wx.aui demos. My problem is with the Grid. It dosen't have scrollbars. I tried many methods (fit) but it always fail. Can somebody point me where is the mistake ? Thx
7
69135
by: moondaddy | last post by:
I have WPF window and a grid. The grid has several columns and rows. How do I add an object to a specific row and column of the gird using c#? If I use: myGrid.Children.Add(dg); then dg will be added to
5
9461
by: gdesou | last post by:
I'm after a grid or list able to display hierarchical items and that is able to collapse to parent items. I Google it for possible solutions but I only get commercial products or reference to Outlook's supergrid that as far as I understand is not available to us, mortals! I will appreciate if you can enlight me on this. Many thanks beforehand
7
2688
by: David T. Ashley | last post by:
I'm trying to implement these ... I know there is a lot of example code on the web, but I'm trying to roll my own ... What JavaScript functionality is typically used to display parts of the menu then hide it again ... haven't found anything that allows erasing or rewriting ... Thanks.
1
1647
by: mahesh123 | last post by:
I am using Collapsible Panel in my project.But in other form of my project i want to use collapsible panel inside other Collapsible panel.Is it possible. Both panels are to be dinamic.Is it possible can any one help me plz. My requirement is I am having different A's. Under each A Can have different B's. For each B can have diffrent C's.
2
4104
by: =?ISO-8859-1?Q?Marco_K=F6rner?= | last post by:
Hello, I'm working on mapping the car's environment by updating an occupancy grid. An occupancy grid dicretizes the 3D space in small grid elements (voxels). A grid element contains informations about the space it's representing. I need to map a space of the dimensions 50m * 5m * 3m with grid elements of size 1cm * 1cm * cm (= 750 000 000 grid elements).
2
1800
by: Effanbee | last post by:
Hi Everybody, Does anybody have an idea for a collapsible grid? I have a grid (ProductsList) displaying several rows. Several of the rows have one column in common ("Product Type"). The goal is to collapse the rows by product type, and total the sum based on the "grouping". The grid is displayed on an .aspx web page and I am using C# as code-behind. Thanks!
5
8067
by: veenna | last post by:
i have a grid inside a collapsible panel in my page. on expand of collapsible panel i want to bind data to grid. how can i do this? how to get the events of collapsible panel. please help regards, veena.
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10023
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5459
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.