Returns a single Row from the Table as specified by the unique identifier value.
Namespace:
ESRI.ArcGISExplorer.DataAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public Row GetRow( int objectID ) |
Visual Basic (Declaration) |
---|
Public Function GetRow ( _ objectID As Integer _ ) As Row |
Parameters
- objectID
- Type: System..::.Int32
The unique ID of the Row to return. For geodatabase tables and feature classes this will be usually be a value from the OBJECTID column, for shapefiles the FID column and dBase tables the OID column.
Return Value
A Row object which represents a single record in the Table.Examples
The code below uses the GetRow method to return a land parcel from the parcels feature class as well as returning
the property owners from the owners table using the GetRelatedRows method.
CopyC#
//Open Montgomery file geodatabase Geodatabase gdb = new Geodatabase(@"C:\Data\Montgomery.gdb"); //Open the parcels featureclass Table parcels = gdb.OpenTable("parcels"); //Get a single parcel Row parcel = parcels.GetRow(3704); //The parcels table is related to the owners table through the ParcelOwners geodatabase relationship class. foreach (Row owner in parcel.GetRelatedRows("ParcelOwners")) { //Print the names of the owners of this parcel System.Diagnostics.Debug.Print(owner.Values["owner_name"].ToString()); }
CopyVB.NET
'Open Montgomery file geodatabase Dim gdb As Geodatabase = New Geodatabase("C:\Data\Montgomery.gdb") 'Open the parcels featureclass Dim parcels As Table = gdb.OpenTable("parcels") 'Get a single parcel Dim parcel As Row = parcels.GetRow(3704) 'The parcels table is related to the owners table through the ParcelOwners geodatabase relationship class. For Each owner As Row In parcel.GetRelatedRows("ParcelOwners") 'Print the names of the owners of this parcel System.Diagnostics.Debug.Print(owner.Values.Item("owner_name").ToString()) Next