Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to create a master/detail datagrid

Status
Not open for further replies.

drewmace

Programmer
Feb 3, 2003
1
US
I know this is probably a simple answer but it is escaping me.! I am trying to create a master datagrid that has a detail datagrid nested in it. The relationship is 1..n or possible 1..null. I have incluided a clip of the code below. I am loading the Child Rows to a new dataset and trying to make the datasource of the detail datagrid that dataset...i keep getting the error "Object reference not set to an instance of an object."

TIA
Drew

LicenseDG.DataSource=dv;
LicenseDG.DataBind();

DataRow[] rows = ds.Tables["Agents"].Rows[0].GetChildRows(agentlicense);
DataSet tmpData = new DataSet();
tmpData.Merge(rows);

dg2.DataSource=tmpData.Tables[0].DefaultView;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top