Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
XamDataGrid Filter Display Values
posted

Hello,

I have a xamdatagrid with a field where I use a converter to change the display values.  I want to use the same converter on the filter values.  Currently I have following XAML

    <dataPresenter:Field Name="Status" Label="Status" Width="80" Converter="{StaticResource GatepassStatusConverter}" Row="1" Column="3">
                <dataPresenter:Field.Settings>
                    <dataPresenter:FieldSettings FilterOperatorDefaultValue="Equals"
                                                 FilterOperatorDropDownItems="Equals"
                                                 FilterOperandUIType="DropDownList">
                        <dataPresenter:FieldSettings.FilterCellEditorStyle>
                            <Style TargetType="{x:Type igWPF:XamComboEditor}">
                                <Setter Property="ValueToTextConverter" Value="{StaticResource GatepassStatusConverter}" />
                                <Setter Property="ValueToDisplayTextConverter" Value="{StaticResource GatepassStatusConverter}" />
                            </Style>
                        </dataPresenter:FieldSettings.FilterCellEditorStyle>                        
                    </dataPresenter:FieldSettings>                    
                </dataPresenter:Field.Settings>
            </dataPresenter:Field>

The items in the filter combobox always show the original instead of the converted values.  Would appriciate all help.

Regards,

Peter

Parents
  • 26105
    Offline posted

    Hello Peter, 

    Thank you for contacting Infragistics. Are you looking to change the display text for item(s) in the filter dropdown list? such as Blanks, Non Blanks etc? There is no built-in way to change these items easily.

    To do this you can handle the grid's RecordFilterDropDownPopulating event (as demonstrated in this forum) and override the Item's DisplayText property. 

    Alternatively you can embed a custom combo editor in the filter row as others have done

    Let me know if you have any additional questions.

Reply Children