Gets a value indicating whether it is possible to access the underlying data 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 bool HasTable { get; }
Visual Basic (Declaration)
Public ReadOnly Property HasTable As Boolean

Field Value

trueTruetruetrue (True in Visual Basic) if there is an associated Table i.e. a vector data source (shapefile or geodatabase feature class); otherwise, falseFalsefalsefalse (False in Visual Basic).

Remarks

A PackageLayer can contain a variety of different data types, some of which have an associated Table object (e.g. shapefiles, geodatabase feature classes) and others which do not (e.g. raster file, geodatabase raster).

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