master / detail datagrid...

Discussion in 'ASP .Net' started by Beren, Oct 10, 2004.

  1. Beren

    Beren Guest

    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
     
    Beren, Oct 10, 2004
    #1
    1. Advertising

  2. Beren

    Hermit Dave Guest

    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" <> wrote in message
    news:vUfad.275044$-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
    >
    >
    >
    >
     
    Hermit Dave, Oct 10, 2004
    #2
    1. Advertising

  3. Beren

    Alex Homer Guest

    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" <> wrote in message
    news:vUfad.275044$-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
    >
    >
    >
    >
     
    Alex Homer, Oct 10, 2004
    #3
  4. Beren

    Beren Guest

    Thanks for the advice guys. Another step in the right direction :)
     
    Beren, Oct 10, 2004
    #4
  5. Beren

    clintonG Guest

    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
    URL http://www.metromilwaukee.com/clintongallagher/






    "Alex Homer" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:vUfad.275044$-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
    > >
    > >
    > >
    > >

    >
    >
     
    clintonG, Oct 11, 2004
    #5
  6. Beren

    Alex Homer Guest

    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" <> wrote in message
    news:...
    > 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
    > URL http://www.metromilwaukee.com/clintongallagher/
    >
    >
    >
    >
    >
    >
    > "Alex Homer" <> wrote in message
    > news:...
    > > 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" <> wrote in message
    > > news:vUfad.275044$-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
    > > >
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Alex Homer, Oct 11, 2004
    #6
  7. Beren

    clintonG Guest

    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
    URL http://www.metromilwaukee.com/clintongallagher/



    "Alex Homer" <> wrote in message
    news:eypJ2D%...
    > 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" <> wrote in message
    > news:...
    > > 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
    > > URL http://www.metromilwaukee.com/clintongallagher/
    > >
    > >
    > >
    > >
    > >
    > >
    > > "Alex Homer" <> wrote in message
    > > news:...
    > > > 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" <> wrote in message
    > > > news:vUfad.275044$-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
    > > > >
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    clintonG, Oct 12, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Dalberg
    Replies:
    0
    Views:
    384
    John Dalberg
    Dec 20, 2005
  2. asmj
    Replies:
    0
    Views:
    509
  3. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    204
    Arun Kumar Menon
    Aug 6, 2003
  4. John Dalberg

    How to get key value in a master datagrid from a detail datagrid?

    John Dalberg, Dec 20, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    136
    John Dalberg
    Dec 20, 2005
  5. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    362
    Frederik Borg
    Jun 9, 2006
Loading...

Share This Page