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
  1. Home
  2. General Programming
  3. C#
  4. diplaying data in datagrid without child table

diplaying data in datagrid without child table

Scheduled Pinned Locked Moved C#
csshelptutorial
4 Posts 2 Posters 0 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.
  • R Offline
    R Offline
    Rizwan Bashir
    wrote on last edited by
    #1

    Hello there I have dataSet containing two relational tables. Say Parent and Child. Now when I assign the Datasource of DataGrid to Parent Table then Child Table automatically attaches and a plus (+) comes with each row containing childs rows from child table. I dont wont to diplay those as I have another grid diplaying the childs. Can any one help me how to get rid of this.

    G 1 Reply Last reply
    0
    • R Rizwan Bashir

      Hello there I have dataSet containing two relational tables. Say Parent and Child. Now when I assign the Datasource of DataGrid to Parent Table then Child Table automatically attaches and a plus (+) comes with each row containing childs rows from child table. I dont wont to diplay those as I have another grid diplaying the childs. Can any one help me how to get rid of this.

      G Offline
      G Offline
      Gavin Jeffrey
      wrote on last edited by
      #2

      Change your datagrids datasource property to be = parent table and not the dataset

      R 1 Reply Last reply
      0
      • G Gavin Jeffrey

        Change your datagrids datasource property to be = parent table and not the dataset

        R Offline
        R Offline
        Rizwan Bashir
        wrote on last edited by
        #3

        its already the parent table only like this dg.datasource=dataset.tables["parent"]; even then it shows the child.. any comments ?

        G 1 Reply Last reply
        0
        • R Rizwan Bashir

          its already the parent table only like this dg.datasource=dataset.tables["parent"]; even then it shows the child.. any comments ?

          G Offline
          G Offline
          Gavin Jeffrey
          wrote on last edited by
          #4

          hmmm...not sure really - what about setting the DataMember i.e. dg.DataMember = "parent"; or clearing all the relations on the dataset i.e. dataset.Relations.Clear();

          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