diplaying data in datagrid without child table
-
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.
-
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.
Change your datagrids datasource property to be = parent table and not the dataset
-
Change your datagrids datasource property to be = parent table and not the dataset
its already the parent table only like this dg.datasource=dataset.tables["parent"]; even then it shows the child.. any comments ?
-
its already the parent table only like this dg.datasource=dataset.tables["parent"]; even then it shows the child.. any comments ?
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();