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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

display child record in datagrid using c# help please

Status
Not open for further replies.

iis6newbie

Technical User
Nov 22, 2003
54
0
0
US

Hello all,

can someone show me how to display perent/child records in datagrid with c#?

Thanks in advance
 
There are many different approaches. First, search Google for "DataGrid Master Detail". There are a lot of examples.

My approach to this has always been to re-bind the DataGrid. In other words, I do the work in the data source. I like to use either DataTables that I build dynamically, or a DataReader supplying an ArrayList, which in turn supplies the DataGrid.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
I've read something about the .net's databinding support for parent-child records via datagrid+datasets.

As far as I can remember, the KB states that when moving from one record to another on the parent table, there are unused references that's left uncollected by the GC, and what's worse, the garbage get's piled up as you move along the records. I'll check on the KB and post it here. The KB suggested however to use a workaround similar to tgreer's post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top