473,403 Members | 2,293 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,403 software developers and data experts.

master / detail datagrid...

Hi all

I'm almost braindead on this one, but how can I create a master/detail
datagrid
in this format :

CatA
subcatA1
subcatA2
subcatA3
CatB
subcatB1

etc

I've been studying this datagrid for hours now and I can't figure it out.
The main idea is to have the CatA & CatB having a full colspan, and having
those subcats as normal datagrid/datalist rows...
Lastly, I need to be able to Page the main CatA, etc.

I tried nesting, but I don't get any wiser from that.
Would filling my dataset with 2 tables from a stored proc work the best way
for this ?
This is because the main Categories and the Subcategories are taken from two
related tables in my database.
Thanks in advance


Nov 18 '05 #1
6 1774
well you said you tried nesting !! i think that is the most appropriate
solution for Parent Child relations.

one of the columns there will be another datarid..

say dgParent has a template column which is a datagrid. dgChild.
onDataBound event... get the categoryid.. using that either fetch or filter
correct records for child and bind it to that row's dgChild.

i have done this a lot of times... infact i had a Parent >> Child >> Child
relationship and after a bit of tweaking it all worked :)

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Beren" <be***@angband.me> wrote in message
news:vU***********************@phobos.telenet-ops.be...
Hi all

I'm almost braindead on this one, but how can I create a master/detail
datagrid
in this format :

CatA
subcatA1
subcatA2
subcatA3
CatB
subcatB1

etc

I've been studying this datagrid for hours now and I can't figure it out.
The main idea is to have the CatA & CatB having a full colspan, and having
those subcats as normal datagrid/datalist rows...
Lastly, I need to be able to Page the main CatA, etc.

I tried nesting, but I don't get any wiser from that.
Would filling my dataset with 2 tables from a stored proc work the best way for this ?
This is because the main Categories and the Subcategories are taken from two related tables in my database.
Thanks in advance

Nov 18 '05 #2
Nesting one "repeating control" such as a Datagrid or Repeater within
another is the way to go. There are several ways you can do it, and there's
a bunch of examples with a [view source] link at:
http://www.daveandal.net/books/6744/samples.aspx
"Beren" <be***@angband.me> wrote in message
news:vU***********************@phobos.telenet-ops.be...
Hi all

I'm almost braindead on this one, but how can I create a master/detail
datagrid
in this format :

CatA
subcatA1
subcatA2
subcatA3
CatB
subcatB1

etc

I've been studying this datagrid for hours now and I can't figure it out.
The main idea is to have the CatA & CatB having a full colspan, and having
those subcats as normal datagrid/datalist rows...
Lastly, I need to be able to Page the main CatA, etc.

I tried nesting, but I don't get any wiser from that.
Would filling my dataset with 2 tables from a stored proc work the best way for this ?
This is because the main Categories and the Subcategories are taken from two related tables in my database.
Thanks in advance

Nov 18 '05 #3
Thanks for the advice guys. Another step in the right direction :)
Nov 18 '05 #4
Thanks for pointing that out Alex.
Having access to "ASP.NET 1.1 Insider Solutions" is a real treat.

If you are feeling up to a bit of controversy I would ask you if you
were interested in discussing how XML namespaces may or may not
result in copyright issues associated with their use.

The highbrows building the markup languages do not want to speak
about this but since you are a working man with a job I figure you
probably have had reason to formulate an opinion or to have been
involved with publishers who have become aware of the considerations
involved.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Alex Homer" <al**@stonebroom.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Nesting one "repeating control" such as a Datagrid or Repeater within
another is the way to go. There are several ways you can do it, and there's a bunch of examples with a [view source] link at:
http://www.daveandal.net/books/6744/samples.aspx
"Beren" <be***@angband.me> wrote in message
news:vU***********************@phobos.telenet-ops.be...
Hi all

I'm almost braindead on this one, but how can I create a master/detail
datagrid
in this format :

CatA
subcatA1
subcatA2
subcatA3
CatB
subcatB1

etc

I've been studying this datagrid for hours now and I can't figure it out. The main idea is to have the CatA & CatB having a full colspan, and having those subcats as normal datagrid/datalist rows...
Lastly, I need to be able to Page the main CatA, etc.

I tried nesting, but I don't get any wiser from that.
Would filling my dataset with 2 tables from a stored proc work the best

way
for this ?
This is because the main Categories and the Subcategories are taken from

two
related tables in my database.
Thanks in advance


Nov 18 '05 #5
Interesting - I have to say I haven't considered this. You mean something
like MS might copyright "asp" as a namespace prefix for use with ASP.NET
controls? Can't say that I can see that coming, but I guess the past
performance of the US patent office might cause one to wonder...

As to a namespace itself (the URI bit) I always use my own domain name. But
I guess there's nothing to stop someone patenting a domain name they don't
own if it's not already copyrighted. Have you come up with a particular
example, or can you expose a little more of your thinking behind the issue?
I haven't heard any mention from publishers - we have enough problems
getting permission to shown screenshots of non-MS software!
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eb*************@TK2MSFTNGP15.phx.gbl...
Thanks for pointing that out Alex.
Having access to "ASP.NET 1.1 Insider Solutions" is a real treat.

If you are feeling up to a bit of controversy I would ask you if you
were interested in discussing how XML namespaces may or may not
result in copyright issues associated with their use.

The highbrows building the markup languages do not want to speak
about this but since you are a working man with a job I figure you
probably have had reason to formulate an opinion or to have been
involved with publishers who have become aware of the considerations
involved.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Alex Homer" <al**@stonebroom.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Nesting one "repeating control" such as a Datagrid or Repeater within
another is the way to go. There are several ways you can do it, and

there's
a bunch of examples with a [view source] link at:
http://www.daveandal.net/books/6744/samples.aspx
"Beren" <be***@angband.me> wrote in message
news:vU***********************@phobos.telenet-ops.be...
Hi all

I'm almost braindead on this one, but how can I create a master/detail
datagrid
in this format :

CatA
subcatA1
subcatA2
subcatA3
CatB
subcatB1

etc

I've been studying this datagrid for hours now and I can't figure it out. The main idea is to have the CatA & CatB having a full colspan, and having those subcats as normal datagrid/datalist rows...
Lastly, I need to be able to Page the main CatA, etc.

I tried nesting, but I don't get any wiser from that.
Would filling my dataset with 2 tables from a stored proc work the
best way
for this ?
This is because the main Categories and the Subcategories are taken
from two
related tables in my database.
Thanks in advance



Nov 18 '05 #6
Aha. Curious huh? :-) Well thank you for replying Alex.
Its good to converse with you once again.

When viewing the source of any page generated by Macromedia's
tools you will see much of the source prefixed with MM_ which
Macromedia uses to 'brand' their source code noting that doing
so is secondary to other processing objectives but is a form
of branding regardless.

Macromedia uses their prefix in the exact same way an XML
Namespace is intended to be used: to resolve ambiguity and
allow two or more instances of similar code to coexist in the
same document.

I really don't know if Macromedia has used the law to ensure
the use of their prefix remains unique to them and them alone.
If I were Macromedia I would sure try to do so.

I have been working on an XML Web Services initiative and have
been using the root element and specific prefixed namespaces to
brand the initiative in the same manner as Macromedia uses their
prefix. It was Macromedia from whom I intuitively derived the idea
to do so in the first place. There is apparently nothing however that
prevents others from also doing so while using the same root element
and prefixed notation as I. Thus, a malicious or envious competitor
could compromise or destroy the viability of my services unless my
works can be protected.

I happen to be much more adept at trend analysis than software
development and I can virtually guarantee that this issue will become
a matter of contention with regard to trademark, copyright, and/or
patent law as the use of XML and web services continue to evolve
as the defacto text and document processing methodology which I
believe you know and I believe you will agree are fundamental to
a Service Oriented Architecture that must by its nature function
semantically for both man and machine.

Registering a copyright in the U.S. is dirt cheap which makes
it the perfect type of protection for small potatos. A regsistration
is required to enter the courts to litigate the use of the property.
It is defending the property in court where the larger costs accrue.
As a mater of fact, most infringers stop infringing after receiving
a 'cease and desist' letter from one's lawyer as it is widely known
that penalties for copyright infringment are quite substantial if the
infringer proceeds to court and loses.

A patent on the other hand can be obtained but unlike the paltry
$30 or so for copyright registration a patent registration can easily
cost more than $5,000 making the acquisition of a patent a costly
and non-trivial process.

Despite the recognized problems we have with an archaic U.S.
government that continues to approve the assingment of 'business
process' patents for processes that are obvious as implemented
I think we could all agree that we all have a right to at least
preserve and protect our work by name.

We may all be what those of us from across the pond call
"sh!t out of luck" though. After weeks and weeks of calling around
I finally found a lawyer who specializes in intellectual property,
has a degree in electrical engineering, and claimed to have had
actually developed some time ago allowing me to consider
him credibly conversant.

The lawyer explained that U.S. copyright applies to the 'entire'
expression. That is, the entire XML file. A copyright could not
apply to just the namespaces and their respective prefixed notation.
He stated the courts would consider XML and any fragment thereof
to be a 'file structure' and used an example to explain.

It seems file structures can not be copyrighted which is why a word
processing application can be made to open and read the files of a
word processor from a competing vendor.

So, regardless of the lawyer's opinions I may be in denial as I
continue to argue that XML is analogous to musical composition
and an XML Namespace is the equivalent of a short musical
passage such as a jingle. If it is a fact that composers who write
jingles can have their work copyrighted -- which it is -- I see no
reason why the copyright office and the courts should disallow
copyright for XML Namespaces an avenue of consideration
I am compelled to continue to persue until such time as they
grant me a copyright or they lock me up for trying.

By the way, in case you are not familiar with the jargon, a 'jingle'
is a short musical passage that is played as background music
during a radio or television advertisement.

Sing along with me now...

"You get more for your money when you eat at Bunny's
so drop on in for a bite at Bunny's greasy spoon."

Did you 'hear' that melody? :-)

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"Alex Homer" <al**@stonebroom.com> wrote in message
news:ey****************@TK2MSFTNGP15.phx.gbl...
Interesting - I have to say I haven't considered this. You mean something
like MS might copyright "asp" as a namespace prefix for use with ASP.NET
controls? Can't say that I can see that coming, but I guess the past
performance of the US patent office might cause one to wonder...

As to a namespace itself (the URI bit) I always use my own domain name. But I guess there's nothing to stop someone patenting a domain name they don't
own if it's not already copyrighted. Have you come up with a particular
example, or can you expose a little more of your thinking behind the issue? I haven't heard any mention from publishers - we have enough problems
getting permission to shown screenshots of non-MS software!
"clintonG" <cs*********@REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:eb*************@TK2MSFTNGP15.phx.gbl...
Thanks for pointing that out Alex.
Having access to "ASP.NET 1.1 Insider Solutions" is a real treat.

If you are feeling up to a bit of controversy I would ask you if you
were interested in discussing how XML namespaces may or may not
result in copyright issues associated with their use.

The highbrows building the markup languages do not want to speak
about this but since you are a working man with a job I figure you
probably have had reason to formulate an opinion or to have been
involved with publishers who have become aware of the considerations
involved.

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET cs*********@REMOVETHISTEXTmetromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Alex Homer" <al**@stonebroom.com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
Nesting one "repeating control" such as a Datagrid or Repeater within
another is the way to go. There are several ways you can do it, and

there's
a bunch of examples with a [view source] link at:
http://www.daveandal.net/books/6744/samples.aspx
"Beren" <be***@angband.me> wrote in message
news:vU***********************@phobos.telenet-ops.be...
> Hi all
>
> I'm almost braindead on this one, but how can I create a master/detail > datagrid
> in this format :
>
> CatA
> subcatA1
> subcatA2
> subcatA3
> CatB
> subcatB1
>
> etc
>
> I've been studying this datagrid for hours now and I can't figure it

out.
> The main idea is to have the CatA & CatB having a full colspan, and

having
> those subcats as normal datagrid/datalist rows...
> Lastly, I need to be able to Page the main CatA, etc.
>
> I tried nesting, but I don't get any wiser from that.
> Would filling my dataset with 2 tables from a stored proc work the best way
> for this ?
> This is because the main Categories and the Subcategories are taken from two
> related tables in my database.
>
>
> Thanks in advance
>
>
>
>



Nov 18 '05 #7

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

Similar topics

0
by: Hari | last post by:
I have got a master detail datagrid in my application. When i select a row in a master table if there are no rows in detail table for the selected row in the master table then i want to give a...
1
by: Juan | last post by:
I built a form that displays a master-detail relation ship, now i need to add a column to the datagrid displaying the master data, this column corresponds to the text name of a column stored in the...
8
by: Christopher Weaver | last post by:
I'm having the hardest time doing the simplest thing. I have a DataGrid bound to a table in a master detail DataRelation within a DataSet relTaskActivities = new DataRelation("TaskActivities",...
0
by: Serge Poirier | last post by:
Good Day Folks, I found the following code here on MSDN illustrating master/detail. You can see the original at the following URL. http://msdn.microsoft.com/library/default.asp?...
2
by: Marcel | last post by:
Hi, I'm new to VS and ASP.NET and have a question about master/detail datagrids. I have a master datagrid filled with data via a component that contains a SQL adapter. Now I would like to fill...
2
by: ruca | last post by:
Hi, I have a master and a detail datagrid. I put detail grid showing insise of a column of master grid. The problem is that it's not what I really want. What I really want would be that the...
4
by: M | last post by:
Hy, I would like to create a master /detail datagrid, that is a datagrid that (when I click on an item) shows some other item's details expanding the rows under the selected grid Can someone...
7
by: erniej | last post by:
as per instructions in the walkthrough, I have managed to create a master/detail relationship between two datagrids. However I have a requirement to apply this to three datagrids and the third...
1
by: Gary200 | last post by:
Hello All, I bind two datagrids in a master-detail relationship successfully. What I want is to set allowNew and allowDelete disabled in both datagrid using dataview. The code like this: ...
1
by: Shalini Bhalla | last post by:
i have 2 tables one is master and another is detail having Ins-no common and iwant that when master recordset is moved then detail recordset pointershould filter detail records correspondint to...
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
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
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...
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
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.