What Changed
Column filtering is now disabled in LookUpEdit.
Reasons for Change
We capture mouse events when you open an editor/filter popup to close this popup if you click outside of it. When one popup is opened from another popup, you may encounter issues similar to this: GridControl clear filter strange behavior inside LookupEdit (window frozen).
We researched this issue and concluded that it would be necessary to switch to a different mechanism for a proper fix. This may lead to new breaking changes and issues in existing projects. Thus, we decided to disable column filtering in LookUpEdit
in order to avoid introducing new issues.
How to Update Existing Apps
If search/filtering is required, we recommend the following options:
- Use the search/filtering functionality available in editors;
XAML<dxg:LookUpEdit ItemsSource="{Binding Items}" IncrementalFiltering="True" DisplayMember="Name" .../>
- Use SearchLookUpEditStyleSettings or SearchTokenLookUpEditStyleSettings. They enable the search field within LookUpEdit's popup.
XAML<dxg:LookUpEdit ItemsSource="{Binding Items}">
<dxg:LookUpEdit.StyleSettings>
<dxg:SearchLookUpEditStyleSettings />
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
IMPORTANT: When column filtering is enabled, you will see the issue demonstrated at T874430, so this approach is not recommended.
You can enable the filter popup as follows if required:
- Set the static CompatibilitySettings.AllowLookupGridFiltering property to
true
beforeLookUpEdit
controls are used:
C#static App() {
DevExpress.Xpf.Core.CompatibilitySettings.AllowLookupGridFiltering = true;
}
- Set AllowColumnFiltering to
true
for theLookUpEdit
's StyleSettings:
XAML<dxg:LookUpEdit ItemsSource="{Binding Items}">
<dxg:LookUpEdit.StyleSettings>
<dxg:LookUpEditStyleSettings AllowColumnFiltering="True" />
</dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>
- Set AllowColumnFiltering to
true
in PopupContentTemplate:
XAML<dxg:LookUpEdit ItemsSource="{Binding Items}">
<dxg:LookUpEdit.PopupContentTemplate>
<ControlTemplate>
<dxg:GridControl Name="PART_GridControl">
<dxg:GridControl.View>
<dxg:TableView AllowColumnFiltering="True" />
</dxg:GridControl.View>
</dxg:GridControl>
</ControlTemplate>
</dxg:LookUpEdit.PopupContentTemplate>
</dxg:LookUpEdit>