AnsweredAssumed Answered

SqlQuery on TableControlContent applies to MapMember

Question asked by cgormanesri-ca-esridist Employee on Feb 11, 2019
Latest reply on Feb 11, 2019 by nchedzey-esristaff

The TableControl and related classes are a great addition to the SDK! 


However, I'm seeing behaviour whereby the SqlQuery applied to a TableControlContent object ends up getting applied to the MapMember (whether it be a StandaloneTable or a Feature Class). 


Is this expected behaviour? I would expect the TableControl to display a custom filter without affecting the built-in attribute table's records. It is as though a DefinitionQuery is getting set somewhere behind the scenes.


After this, it seems the filter is cached on the MapMember, and subsequent queries in the Addin continually return the same results. Even after closing the the "Road Names Pane", which is a MapImpersonation pane, upon opening a new Pane, the same results are returned despite a change in the SqlQuery.


Is this a bug?


If so, is there a workaround you can suggest to get around this? I am in the process of refactoring an Addin to replace a custom WPF table with the TableControl and would prefer not to back-out these changes.





MapMember attribute table has 1000's of records.


After appling SqlQuery to TableControlContent, attribute table contains same result.