I'm using a DevExpress grid and I'm trying to get a 'Country' column to display the header filter properly:
<dx:GridViewDataColumn Caption="Country" FieldName="CountryName"
ShowInCustomizationForm="True" Visible="false">
<Settings AllowHeaderFilter="True"/>
</dx:GridViewDataColumn>
If the 'Country' column is set to Visible='true', then the header filter is displayed as it should(it shows the value option list). However, I want the 'Country' column to be initially hidden, but available in a Customization window(like in the code above). In this case, when the column is dragged outside the Customization window and into the grid and the header filter is clicked, a Javascript error is encountered:
element is null
element.addEventListener(eventName, func, true);
Is this a known bug? Are there any workarounds?
Best Answer
Set the ASPxGridView.Settings.ShowHeaderFilterButton property to true to resolve this problem.
The following markup works fine for me (I am using DXperience 10.1.7):