Private Sub RefreshAttributeTable() Try Dim tableWindow As ITableWindow3 = New TableWindow tableWindow.ActiveTableWindow.Refresh() My.ArcMap.Document.ActiveView.Refresh() Catch ex As Exception Debug.WriteLine(String.Format("{0}; {1}", ex.Message, ex.StackTrace)) End Try End Sub
Private Sub RefreshAttributeTable(ByRef featureLayer As IFeatureLayer2) Try Dim tableWindow As ITableWindow3 = New TableWindow Dim existingTable As ITableWindow3 existingTable = tableWindow.FindViaLayer(CType(featureLayer, ILayer)) existingTable.ShowSelected = Not existingTable.ShowSelected existingTable.ShowSelected = Not existingTable.ShowSelected Catch ex As Exception Debug.WriteLine(String.Format("{0}; {1}", ex.Message, ex.StackTrace)) End Try End Sub
IMxDocument updateContents
Firing ISelectionEvents.SelectionChanged (carto) usually does the trick.
http://forums.esri.com/thread.asp?c=93&f=992&t=118750&m=859399#369378
Dim tableWindow As ESRI.ArcGIS.ArcMapUI.ITableWindow = New ESRI.ArcGIS.ArcMapUI.TableWindow tableWindow = tableWindow.FindViaFeatureLayer(fLayer, False) tableWindow.Refresh()
Public Sub RefreshTableWindows()
Try
Dim tableWindow3 As ITableWindow3 = New TableWindowClass
Dim eSet As ESRI.ArcGIS.esriSystem.ISet = Nothing
tableWindow3.FindOpenTableWindows(eSet)
If eSet.Count > 0 Then
eSet.Reset()
Dim tw As ITableWindow = CType(eSet.Next, ITableWindow)
Do While tw IsNot Nothing
If tw.IsVisible Then
tw.TableControl.RemoveAndReloadCache()
tw.TableControl.RereadFIDs(Nothing)
tw.TableControl.Redraw()
End If
tw = CType(eSet.Next, ITableWindow)
Loop
End If
Catch ex As Exception
End Try
End Sub