Gets related rows from another table which are linked by the specified relationship name.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public RowCollection GetRelatedRows(
	string relationshipName
)
Visual Basic (Declaration)
Public Function GetRelatedRows ( _
	relationshipName As String _
) As RowCollection

Parameters

relationshipName
Type: System..::.String

The name of the geodatabase relationship class or the name of the in-memory TableRelationship object which defines the relationship between two tables.

Return Value

A RowCollection object which contains a number of Row objects each of which represents a record in the Table.

Remarks

To use this method a relationship must already be defined between two tables in a geodatabase relationship class. Note that this method will not work for in-memory TableRelationship, instead use the GetRelatedRows(TableRelationship) overload.

Examples

The code below illustrates the GetRelatedRows method by finding all the rows which are related to the rows in a RowCollection through a geodatabase relationship class.
CopyC#
{
  //Open file geodatabase feature class
  Table treeStandsTable = Table.OpenFileGeodatabaseTable(@"C:\Data\Forestry.gdb", "Stands");

  //Find all tree stands in a specific area
  RowCollection treeStandRows = treeStandsTable.Search(new Filter("BLK=8"));

  //Specify a geodatabase relationship class name as the argument to the GetRelatedRows 
  //method in order to find the rows in the Components table that are related to the rows 
  //in the tree stands RowCollection.
  RowCollection componentRows = treeStandRows.GetRelatedRows("StandsComponents");
}
CopyVB.NET
'Open file geodatabase feature class
Dim treeStandsTable As Table = Table.OpenFileGeodatabaseTable("C:\Data\Forestry.gdb", "Stands")

'Find all tree stands in a specific area
Dim treeStandRows As RowCollection = treeStandsTable.Search(New Filter("BLK=8"))

'Specify a geodatabase relationship class name as the argument to the GetRelatedRows 
'method in order to find the rows in the Components table that are related to the rows 
'in the tree stands RowCollection.
Dim componentRows As RowCollection = treeStandRows.GetRelatedRows("StandsComponents")

See Also