This documentation is archived and is not being maintained.

DataRelation.ChildColumns Property

Gets the child DataColumn objects of this relation.

Namespace: System.Data
Assembly: System.Data (in system.data.dll)

public virtual DataColumn[] ChildColumns { get; 
/** @property */
public DataColumn[] get_ChildColumns ()

public function get ChildColumns () : DataColumn[]

Property Value

An array of DataColumn objects.

The following example gets the child DataColumn objects of a DataRelation.

Private Sub GetChildColumns()
    ' Get the DataRelation of a DataSet.
    Dim relation As DataRelation = _
        DataSet1.Relations("CustomerOrders")

    ' Get the child columns.
    Dim childArray() As DataColumn = relation.ChildColumns

    ' Print the ColumnName of each column.
    Dim i As Integer
    For i = 0 to childArray.GetUpperBound(0)
       Debug.Write(childArray(i).ColumnName)
    Next i
End Sub

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0
Show: