Hi,
How do I change the combobox style in the filter line?
I would like to make the combobox borders and drop-down icon always visible (not only on hover/selected)... And I would like to set the drop-down width to a fixed width (max length a dropdown item).
Thanks
Hey,
I've same requirements to show filter drop down icon visible. As user do not know he/she can do filtering.
So I am trying this 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.
Thanks Alex,
It is working for me. See the xaml below.
<
>
}">
="Always" />
Have you tried setting the DropDownButtonDisplayMode property of the XamComboEditor to Always?
This should make the DropDownButton appear at all times.
Sorry Alex, it seems there was a disconnect in communication. I wanted to change the style of the combobox background and foreground. That seems to be doable via the FilterCellEditorStyle and FilterCellValuePresenterStyle.
Here is a test sample of my FilterCellEditorStyle: <Style x:Key="SampleFilterCellEditorStyle" TargetType="{x:Type igEditors:XamComboEditor}"> <Setter Property="Background" Value="Red" /> <Setter Property="TextElement.Foreground" Value="White" /> <Style.Triggers> <Trigger Property="IsInEditMode" Value="true"> <Setter Property="Background" Value="White" /> <Setter Property="TextElement.Foreground" Value="Yellow" /> </Trigger> </Style.Triggers> </Style>
However, I want the ComboBox of the filter to be visible always. Not just when you hover over the filter. For this, I think it is being set in the FilterCellValuePresenter. I see a ControlTemplate.Trigger like below, but I can't find the style which is setting the Visibility to Hidden or Collapsed for that template.
DataPresenterGeneric_Express.xaml (Line 4066):<!-- IsActive --><Trigger Property="IsActive" Value="true"> <Setter TargetName="PART_EditorSite" Property="Style" Value="{Binding Path=ForegroundActiveStyle, RelativeSource={RelativeSource TemplatedParent}}"/> <Setter Property="Visibility" TargetName="Active" Value="Visible"/></Trigger>
Can you help? If not, can you provide the template for the PART_EditorSite? That way, I could overwrite it and its triggers.
To the best of my knowledge, there is no way to restyle the items in the dropdown except creating a style for the ComboBoxItem (with no x:key) and putting it in the resources of the FilterCellValuePresenter's style.