Hey,
I need to show filter drop down icon visible always in xamdatagrid((not only on hover/selected)). As user do not know he/she can do filtering until they hover or select.
So I am trying to set FilterCellEditorStyle in fieldsettings like below but i am facing this error. "'XamComboEditor' TargetType does not match type of element 'XamCheckEditor'." Can some one please let me know how i can resolve this and it should start working.
<Style x:Key="DropDownTest" TargetType="{x:Type igEditors:XamComboEditor}"><Setter Property="DropDownButtonDisplayMode" Value="Always" /></Style>
<igDP:XamDataGrid.FieldSettings><igDP:FieldSettings CellHeight="18" ExpandableFieldRecordHeaderDisplayMode="AlwaysDisplayHeader" AllowRecordFiltering="True" CellClickAction="SelectRecord"AutoSizeOptions="All" FilterCellEditorStyle="{StaticResource DropDownTest}" FilterClearButtonVisibility="Visible" FilterStringComparisonType="CaseInsensitive" ></igDP:FieldSettings></igDP:XamDataGrid.FieldSettings>
Please let me know as this is urgent or if any other way around to achieve this ?
Hi Marrianne,
"Hello Marianne,
Thanks for you quick hint. I create one property and applied filtercelleditorstyle via converter and it's working fine.
Thanks"
How exactly the above comment of the user solved the issue. I am facing the same issue.
Thanks, Nikhil
Hello Saurabh,
You are very welcome. Glad to be able to help you.
Hello Marianne,
Thanks
My fields are auto generated. I set the datasource as i have more than 300 columns in my grid. So i can not declare each field and bind the fields in the way. If there is some other way then that should be great. Otherwise i think implementation for FilterCellEditorStyle must be change. If i am applying it to combo editor then it should apply on combo editor only.
If there is any other workaround then please let me know.
Stefan is not available today, so I am going to send you the code you requested.
Here is the code modified as Stefan suggested adding the FilterCellEditorStyle to each field instead of to the xamDataGrid’s FieldSettings. That way you can control which fields are affected.
Here is what your sample xaml would look like.
<Grid.Resources>
<Style x:Key="DropDownTest" TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="DropDownButtonDisplayMode" Value="Always" />
</Style>
</Grid.Resources>
<igDP:XamDataGrid Name="xamDataGrid1" VerticalAlignment="Top">
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings
ExpandableFieldRecordHeaderDisplayMode="AlwaysDisplayHeader" AllowRecordFiltering="True"
CellClickAction="SelectRecord"
AutoSizeOptions="All"
FilterClearButtonVisibility="Visible" FilterStringComparisonType="CaseInsensitive" ></igDP:FieldSettings>
</igDP:XamDataGrid.FieldSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout IsDefault="True">
<!-- TODO: You need to add all fileds to the root field layout in XAML-->
<igDP:Field Name="CategoryID" >
<igDP:Field.Settings >
<igDP:FieldSettings FilterCellEditorStyle="{StaticResource DropDownTest}" />
</igDP:Field.Settings>
</igDP:Field>
<igDP:Field Name="CategoryName" >
<igDP:Field Name="Description" />
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Let me know if you have any questions.