Hi,
I'm using the XamDataGrid and want to hide the filter operator (e.g. Aa. symbol) on some of the columns. Only the input field should appear.
Is this possible and if yes, how can I achieve this?
Kindly Regards
Micha
Hello Micha,
Thank you for your post.
I have been looking into the functionality you are trying to achieve and if I understand correctly your requirements I can suggest you to create a style for ComparisonOperatorSelector. In the style you can use EventSetter in order to be able to handle its Loaded event. In the event handler you can get the ComparisonOperatorSelector’s Field from the FilterCellValuePresenter and set the Visibility property of the ComparisonOperatorSelectorfor the Fields you want to Collapsed.
I created short sample application based on your scenario in order to show you how you can implement this approach.
Please let me know if you require any further assistance on the matter.
Thank you very much for your quick answer!
I've found also a solution, which I prefer, because it's all XAML:
<igWPF:XamDataGrid RecordLoadMode="LoadOnDemand" DataSource="{Binding BookingsLVM}">
<igWPF:XamDataGrid.FieldSettings>
<igWPF:FieldSettings AllowRecordFiltering="True" />
</igWPF:XamDataGrid.FieldSettings>
<igWPF:XamDataGrid.FieldLayouts>
<igWPF:FieldLayout IsDefault="True">
<igWPF:FieldLayout.Fields>
<igWPF:TextField Name="Typ" AllowEdit="False">
<igWPF:TextField.Settings>
<igWPF:FieldSettings FilterOperandUIType="DropDownList" FilterOperatorDropDownItems="StartsWith" />
</igWPF:TextField.Settings>
</igWPF:TextField>
In the FieldSettings you can choose the FilterOperandUIType and the FilterOperatorDropDownItems. If the FilterOperatorDropdownItems has zero or one items the operator icon is gone :-)
Thank you for your feedback.
I am very glad that you resolved your issue. If you require any further assistance on the matter, please do not hesitate to let me know.