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

Multilevel Hierarchial Datagrids

I am trying to get some help on creating a Multilevel Hierarchial
Datagrid. What I mean is that the Hierarchial level is unknown. There
could be many related records or none. Also there could be multiple
categories. Hopefully the data below will give some idea.

Here is some data:

Category Amount
1 10
1.1 5
1 5
1.1.1 5
2 20
2.1 10
3 50
I would like to display this into a datagrid. I think I can display the
data into the datagrid, but I would like it to be a collapsale datgrid,
so that the user can read summarized information easily. I have not
figured the select statment yet because I first want to know how that
data will be displayed.

Datgrid View (Collapsable):
Category Amount(Sub Categories Total)
1 15(10)
->1.1 5(5)
-->1.1.1 5
2 20(10)
->2.1 10
3 50(0)

Any help will be great.
Thanks,
rythm

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
2 1962
Rythm,

The problem with this is that the result sets from SQL queries are
tabular, and not heiarchical. What you need to do is create the child
tables which have a field indicating the parent record. Then, you have to
cycle through the table and place the records in the child tables, linking
them up.

Then, when you attach the whole data set to the data grid, you should be
able to drill down (but you won't be able to see everything on the screen at
once, since the grid is tabular, and not a tree control).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rythm Music" <ry******@yahoo.com> wrote in message
news:OH**************@TK2MSFTNGP11.phx.gbl...
I am trying to get some help on creating a Multilevel Hierarchial
Datagrid. What I mean is that the Hierarchial level is unknown. There
could be many related records or none. Also there could be multiple
categories. Hopefully the data below will give some idea.

Here is some data:

Category Amount
1 10
1.1 5
1 5
1.1.1 5
2 20
2.1 10
3 50
I would like to display this into a datagrid. I think I can display the
data into the datagrid, but I would like it to be a collapsale datgrid,
so that the user can read summarized information easily. I have not
figured the select statment yet because I first want to know how that
data will be displayed.

Datgrid View (Collapsable):
Category Amount(Sub Categories Total)
1 15(10)
->1.1 5(5)
-->1.1.1 5
2 20(10)
->2.1 10
3 50(0)

Any help will be great.
Thanks,
rythm

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
I had considered a Parent Child relationship, but the problem is that
there could be a multlevel relationship.

Parent->Child->GrandChild->GreatGrandChild...
1->1.1->1.1.1->1.1.1.1....

That is where the problem is with that approach.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

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

Similar topics

0
by: Reimar Bauer | last post by:
Dear all is there an encryption/decryption method available with multilevel passwords? Thanks for any help Reimar Bauer --
1
by: rawCoder | last post by:
Hi All, Is the Hierarchial Display of data not in DataGridView in Visual Studio 2005 Beta 2 even? I am talking about showing rows with tree like (+) and (-) and collapse and expand in a...
34
by: Karam Chand | last post by:
Hello I have been working with Access and MySQL for pretty long time. Very simple and able to perform their jobs. I dont need to start a flame anymore :) I have to work with PGSQL for my...
0
by: virendra | last post by:
hi, I am working on crystal report 9 in asp.net. I created multilevel dynamic grouping in CR. if page is load firsttime. and i am giving firstlevel of grouping or whatever it's working fine. but...
0
by: sphemamalini | last post by:
respected sir, i need to know whether DB2 is good for doing our project based on multilevel security on database.shall we use java for creating web page.we use java as front end.DB2 as back end.DB2...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: nintesa | last post by:
I'm using Oscommerce, Joomla, Mambo ecc... everyone of these have a good multilevel admin panel. Now I'm developing a new indipendent little application ad I'm wondering if there is a small...
0
petepell
by: petepell | last post by:
Hello all, I am developing an application in VB 2008 that works with a SQL2005 DB to store and manipulate employee data. In one section of the app I want to be able to show a treeview of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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,...
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...

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.