Groups | Blog | Home
all groups > vb.net data > january 2005 >

vb.net data : Child window in Datagrid



Viet
1/5/2005 4:29:27 PM
Does anyone know how to display just the child window in the Datagrid
control instead of the default parent-child tree in vb.net?
thanks!




sstein NO[at]SPAM online.microsoft.com (
1/7/2005 6:52:47 PM

Hello -

To display a child table in the DataGrid set the DataGrid.DataMember
property to the DataRelation name. For example, if you have a DataSet named
DataSet1 with ParentTable and ChildTable connected with ParentChildRelation
the code would look like this:

DataGrid1.DataSource = DataSet1
DataGrid.DataMember = ParentTable.ParentChildRelation


hope that helps

Steve Stein
VB Team

This posting is provided "AS IS" with no warranties and confers no rights.

--------------------
| From: "Viet" <vpho@starcalif.com>
| Subject: Child window in Datagrid
| Date: Wed, 5 Jan 2005 16:29:27 -0800
| Lines: 8
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <esd8Ib48EHA.2032@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb.data
| NNTP-Posting-Host: starcalif.com 65.168.176.131
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.languages.vb.data:4612
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb.data
|
| Does anyone know how to display just the child window in the Datagrid
| control instead of the default parent-child tree in vb.net?
| thanks!
|
|
|
|
|
|
AddThis Social Bookmark Button