This documentation is archived and is not being maintained.

DataRelation.ChildColumns Property

Gets the child DataColumn objects of this relation.

[Visual Basic]
Public Overridable ReadOnly Property ChildColumns As DataColumn ()
[C#]
public virtual DataColumn[] ChildColumns {get;}
[C++]
public: __property virtual DataColumn* get_ChildColumns();
[JScript]
public function get ChildColumns() : DataColumn[];

Property Value

An array of DataColumn objects.

Example

[Visual Basic] The following example gets the child DataColumn objects of a DataRelation.

[Visual Basic] 
Private Sub GetChildCols()
    Dim ChildArr() As DataColumn
    ' Get the DataRelation of a DataSet.
    Dim dr As DataRelation
    dr = DataSet1.Relations("CustomerOrders")
    ' Get the child columns.
    ChildArr = dr.ChildColumns
    ' Print the ColumnName of each column.
    Dim i As Integer
    For i = 0 to ChildArr.GetUpperBound(0)
       Debug.Write(ChildArr(i).ColumnName)
    Next i
 End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

DataRelation Class | DataRelation Members | System.Data Namespace | DataColumn | ParentColumns

Show: