DataGrid`s datasource
-
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.
-
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.
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 withParent
property of your forms. Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji -
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.
-
I don't think you can do it "visually". You'll have to do it through code, something like Mazdak says. -Sheppe
ok. Thanks
-
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 withParent
property of your forms. Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babujithanks mazdak. but i want to do it visually , not by code.