I am working on a project where I have to do some considerable customizations around localization. Specifically the product needs to handle 4 different languages from PickLists, Groups, DependencyLookups, and more. Today I was implementing a solution around dependency lookups and could not get the lookup to change based on my language settings. What I was doing was changing the PreFilter properties to point to an extended field on my ACI table. I tried various things with no success. I decided to dig into the controls code and see if there was something that would lead me to a solution.
In the code I got my Ah Ha moment as I could see that some filter state was being stored in the HttpCache however it was never being cleared, nor was there a way on the control to invoke a clear action. Though the control did not expose an invalidate method the solution was quite simple once the issue was discovered.
Simply call
HttpContext.Current.Cache.Remove(dpeLookup.ClientId);
This will clear the filters from the cache and reload them correctly.
Mark