Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. DataGridView Parent/Child

DataGridView Parent/Child

Scheduled Pinned Locked Moved Visual Basic
helpcsharpasp-netsales
8 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alwinSCH
    wrote on last edited by
    #1

    Hi there, could anyone help me start with this: don't know where to look or start I have 3 tables which i want to show in a datagrid --> Parent First row = Customer name + child first row totalsum of orders for this customer + ChildChild First row = Detailed orders for this customer With a + or - button to click open or not I also work wit *.xsd scheme tableAdapters,... already have a relation between those tables But then i'm stuck Please get me back on track... If i read everywhere it's all in ASP.net with dataset and thinks like that... But i don't know how thhat helps me... thanks A.

    A D 2 Replies Last reply
    0
    • A alwinSCH

      Hi there, could anyone help me start with this: don't know where to look or start I have 3 tables which i want to show in a datagrid --> Parent First row = Customer name + child first row totalsum of orders for this customer + ChildChild First row = Detailed orders for this customer With a + or - button to click open or not I also work wit *.xsd scheme tableAdapters,... already have a relation between those tables But then i'm stuck Please get me back on track... If i read everywhere it's all in ASP.net with dataset and thinks like that... But i don't know how thhat helps me... thanks A.

      A Offline
      A Offline
      AliAmjad
      wrote on last edited by
      #2

      Create a Dataset Object Fill the Dataset with Tables then Create the Relationship between these tables make the DatagridView.DataSource property equal to that Dataset. Does this solves your problem? AliAmjad (MCP)

      A 1 Reply Last reply
      0
      • A AliAmjad

        Create a Dataset Object Fill the Dataset with Tables then Create the Relationship between these tables make the DatagridView.DataSource property equal to that Dataset. Does this solves your problem? AliAmjad (MCP)

        A Offline
        A Offline
        alwinSCH
        wrote on last edited by
        #3

        It is all with dataset but i have tableAdapters so how do i fill my dataset with correct data throug TableAdapters? The relationship is already created between my tableAdapters! i can use My tableAdapter as well to fill a datagrid, why change to a Dataset? A.

        1 Reply Last reply
        0
        • A alwinSCH

          Hi there, could anyone help me start with this: don't know where to look or start I have 3 tables which i want to show in a datagrid --> Parent First row = Customer name + child first row totalsum of orders for this customer + ChildChild First row = Detailed orders for this customer With a + or - button to click open or not I also work wit *.xsd scheme tableAdapters,... already have a relation between those tables But then i'm stuck Please get me back on track... If i read everywhere it's all in ASP.net with dataset and thinks like that... But i don't know how thhat helps me... thanks A.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          DataGridView is a Windows Forms control only. It doesn't support showing child tables the way you want without HEAVY modifications to the DGV. You'd be better off using a 3rd party grid control like DevExpress' XtraGrid.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          A 1 Reply Last reply
          0
          • D Dave Kreskowiak

            DataGridView is a Windows Forms control only. It doesn't support showing child tables the way you want without HEAVY modifications to the DGV. You'd be better off using a 3rd party grid control like DevExpress' XtraGrid.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            A Offline
            A Offline
            alwinSCH
            wrote on last edited by
            #5

            No other Solution? I don't want the third party grid! But thanks anyway A.

            D D 2 Replies Last reply
            0
            • A alwinSCH

              No other Solution? I don't want the third party grid! But thanks anyway A.

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              The other solution would take you about 3 months to write. Like I said, the DGV doesn't natively support showing child tables. I went for a 3rd party solution, and after downloading and installing the controls, had my requirement done in about 3 minutes.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              1 Reply Last reply
              0
              • A alwinSCH

                No other Solution? I don't want the third party grid! But thanks anyway A.

                D Offline
                D Offline
                darkelv
                wrote on last edited by
                #7

                You can use the "old" DataGrid.

                A 1 Reply Last reply
                0
                • D darkelv

                  You can use the "old" DataGrid.

                  A Offline
                  A Offline
                  alwinSCH
                  wrote on last edited by
                  #8

                  The 'Old' DataGrid ?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups