I have written an ArcMap Addin (ArcMap 10.0) that allows a user to perform a join between an in-memory table and a feature class (feature layer) added to the TOC. I want the attribute table of the feature layer to automatically refresh after the join occurs if the user happens to have the attribute table visible when performing the join. This way the fields added to the table via the join will be visible to the user without having to close and reopen the Attribute Table.
The following function is what I have tried to refresh the Attribute Table, but it does not actually refresh the display.
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
Can anyone help with this?