Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

' set the active display Dim disp As ESRI.ArcGISExplorer.Mapping.MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay

    ' define the item that selected by user
    Dim SelItem As ESRI.ArcGISExplorer.Application.SelectedItemsCollection = ESRI.ArcGISExplorer.Application.Application.SelectedItems

    ' define the name of selected item
    Dim SIName As String

    ' define a featurelayer for selected item
    Dim FLitem As FeatureLayer

    ' get the name of user selected item
    SIName = SelItem.Item(0).ToString()

    'display the name on the label
    Label1.Text = SIName

    ' find the featurelayer that has the name which equals to the one user selected
    FLitem = disp.Map.FindByName(SIName)

    ' create a new bindtable and fill it with featurelayer's table
    Dim FLbind As TableBindingAdapter
    FLbind = New TableBindingAdapter(FLitem.Table)
    FLbind.Fill()

    ' using the datagridview to show the bindtable which is the selected rows
    DataGridView1.DataSource = FLbind
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.