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
630
ItemTemplate in collapsed mode differs from the one in expanded mode
posted

Hi,

I'm using the XamComboEditor from the xmlns:ig="http://schemas.infragistics.com/xaml" namespace

 <ig:XamComboEditor
                        x:Name="cEdtUser"
                        VerticalAlignment="Center"
                        FontSize="{StaticResource FontSize}"
                        Margin="{StaticResource Margin}"
                        Grid.Row="0"
                        Grid.Column="1"
                        ItemsSource="{Binding Users}">
                        <ig:XamComboEditor.ItemTemplate>
                            <DataTemplate>
                                <TextBlock
                                    Text="{Binding DisplayName}" />
                            </DataTemplate>
                        </ig:XamComboEditor.ItemTemplate>
                    </ig:XamComboEditor>

Users is a ObservableCollection of user objects, and DisplayName is one of the properties of the user class.

Issue 1)

In expanded mode everything looks fine.

But once I select an Item e.g. dgeiss, I get the following result.

Well "Darius" is the content of another property of the user object with the DisplayName "dgeiss", but not the one I set in the ItemTemplate.

What am I doing wrong? I follwed the example "Using Data Templates for ComboEditor" from the SampleBrowser.

Issue 2)

I'm also using an ItemsFilter with the XamComboEditor.

 // Creates new ComparisonCondition object
            ComparisonCondition condition = new ComparisonCondition();
 
            // Sets comparison operator - Contains
            condition.Operator = ComparisonOperator.Contains;
            condition.CaseSensitive = false;
 
            ItemsFilter customItemsFilter = new ItemsFilter();
 
            // Adds ComparisonCondition object into ItemsFilter Conditions collection
            customItemsFilter.Conditions.Add(condition);
 
            // Sets created ItemsFilter as CustomItemsFilter of XamComboEditor
            cEdtUser.CustomItemsFilter = customItemsFilter;

Using the same example from Issue 1:

If I type "is", I get "Admninistrator" and not as expected "Administrator" and "dgeiss". I think this has something to do with the first issue, or am I wrong?

Kind regards,

Darius Geiss

Parents Reply Children
No Data