Gets the underlying Table associated with the PackageLayer.

Namespace:  ESRI.ArcGISExplorer.Mapping

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

Syntax

C#
public Table Table { get; }
Visual Basic (Declaration)
Public ReadOnly Property Table As Table

Field Value

A Table object which represents the underlying data and schema associated with a shapefile or geodatabase feature class data source.

Remarks

Use the HasTable property to check whether the Table object can be accessed.

Bear in mind that the Table may not contain all the rows in the underlying feature class if a definition expression was present on the ArcGIS Desktop feature layer used to create the layer package.

Examples

The code below checks whether the selected PackageLayer has an associated Table using the HasTable property, returns a Table object using the Table property then prints out the contents of each Row in the Table.
CopyC#
//Return the selected items in the contents view.  
SelectedItemsCollection selectItems = ESRI.ArcGISExplorer.Application.Application.SelectedItems;

//check that a single PackageLayer MapItem is selected
if ((selectItems.Count == 1) && (selectItems[0] is PackageLayer))
{
  PackageLayer pl = selectItems[0] as PackageLayer;

  //check to see whether there is a Table associated with the PackageLayer
  if (pl.HasTable)
  {
    //Return the Table
    Table t = pl.Table;

    //Iterate over all the Rows, printing all the Column values.
    foreach (Row row in t.GetRows())
    {
      System.Diagnostics.Debug.Print(row.Values.ToString());
    }
  }
}
CopyVB.NET
'Return the selected items in the contents view.  
Dim selectItems As SelectedItemsCollection = ESRI.ArcGISExplorer.Application.Application.SelectedItems

'check that a single PackageLayer MapItem is selected
If (selectItems.Count = 1) AndAlso (TypeOf selectItems.Item(0) Is PackageLayer) Then

  Dim pl As PackageLayer = DirectCast(selectItems.Item(0), PackageLayer)

  'check to see whether there is a Table associated with the PackageLayer
  If (pl.HasTable) Then
    'Return the Table
    Dim t As Table = pl.Table

    'Iterate over all the Rows, printing all the Column values.
    For Each r In t.GetRows
      System.Diagnostics.Debug.Print(r.Values.ToString())
    Next
  End If
End If

See Also