GridView does not show + for expanding
Posted on 2006-11-28
I am using a GridView, which is bound to a dataset. The dataset contains two tables, I use two command objects to fill the same dataset.
I do see the rows of the parent table bound to the GriDView, but I was expecting a + sign to expand and view the child table.
The asp 2.0 GridView has no feature of Allow Navigation
DataSet ds = new DataSet();
dataadapter.Fill(ds,”Deal”); // Fill the dataset with Deal data
dataadapter.Fill(ds,”Facility”); // Next fill the dataset with Facility
DataColumn parent = ds.Tables["Deal"].Columns["OrderID"]; // add the key column name from the parent table
DataColumn child = ds.Tables["Facility"].Columns["FK_OrderID"]; // add the foreign key column from child table
DataRelation cr = new DataRelation("Dealrelation", parent, child, false); // create a relationship between parent/ child