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. DataGrid`s datasource

DataGrid`s datasource

Scheduled Pinned Locked Moved C#
tutorial
5 Posts 3 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.
  • U Offline
    U Offline
    User 1140288
    wrote on last edited by
    #1

    have a main form that my all tables filled in a dataset on that form.(i creat this DataSet visually , by drag and droping) I create sum child forms that each one have a DataGrid object. I want to set each DataGrid`s DataSource property to MainForm`s DataSet. i want to do this action visually.(in other word, i want to set DataGrid`s DataSource property in PropertyGrid in each form.) please guide to me.

    M S 2 Replies Last reply
    0
    • U User 1140288

      have a main form that my all tables filled in a dataset on that form.(i creat this DataSet visually , by drag and droping) I create sum child forms that each one have a DataGrid object. I want to set each DataGrid`s DataSource property to MainForm`s DataSet. i want to do this action visually.(in other word, i want to set DataGrid`s DataSource property in PropertyGrid in each form.) please guide to me.

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      One way is to pass the DataSource with constructor of your child forms to them. Another way is , I think accessing to main form from your child form with Parent property of your forms. Mazy
      "One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji

      U 1 Reply Last reply
      0
      • U User 1140288

        have a main form that my all tables filled in a dataset on that form.(i creat this DataSet visually , by drag and droping) I create sum child forms that each one have a DataGrid object. I want to set each DataGrid`s DataSource property to MainForm`s DataSet. i want to do this action visually.(in other word, i want to set DataGrid`s DataSource property in PropertyGrid in each form.) please guide to me.

        S Offline
        S Offline
        sheppe
        wrote on last edited by
        #3

        I don't think you can do it "visually". You'll have to do it through code, something like Mazdak says. -Sheppe

        U 1 Reply Last reply
        0
        • S sheppe

          I don't think you can do it "visually". You'll have to do it through code, something like Mazdak says. -Sheppe

          U Offline
          U Offline
          User 1140288
          wrote on last edited by
          #4

          ok. Thanks

          1 Reply Last reply
          0
          • M Mazdak

            One way is to pass the DataSource with constructor of your child forms to them. Another way is , I think accessing to main form from your child form with Parent property of your forms. Mazy
            "One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji

            U Offline
            U Offline
            User 1140288
            wrote on last edited by
            #5

            thanks mazdak. but i want to do it visually , not by code.

            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