This is a migrated thread and some comments may be shown as answers.

GridViewComboBoxColumn AutoComplete Virtualization Issue...

4 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 15 Jun 2015, 08:08 PM

I think the issue has something to do with how the drop down is virtualized, but I could be wrong...  Here is what happens:

1.  Have a grid with a GridViewComboBoxColumn

2.  Have a collection larger than what there is enough height in the drop down to show

3.  Pull up your screen, click on the column drop down and type a character

When I do this on a list of people, the short listing is messed up.  If I type a W, I get one name that starts with W, but there should be 2.  If I type a second W, then I see the two names.  If I back up and hit a different character, I see those names I should, but then sometimes all the names that follow after them in the collection, which should not show.

If I increase the MaxDropDownHeight property to be large enough to now display the whole collection at once, type ahead works correctly.

So, when the drop down visible container size is large enough to contain the entire collection, everything works.  Otherwise, type ahead doesn't work correctly.

Here is my XAML code:

<telerik:GridViewComboBoxColumn Width="300"
                                DataMemberBinding="{Binding PersonId}"
                                DisplayMemberPath="Description"
                                EditTriggers="CellClick"
                                EditorStyle="{Binding Source={StaticResource RadGridComboBoxStandard}}"
                                Header="Assigned Officer"
                                IsReadOnly="{Binding Path=DataContext.TransportOfficerIsEnabled,
                                                     RelativeSource={RelativeSource FindAncestor,
                                                                                    AncestorType=telerik:RadGridView},
                                                     Converter={StaticResource BooleanInverseConverter},
                                                     Mode=OneWay}"
                                IsReadOnlyBinding="{Binding IsRowReadOnly}"
                                ItemsSourceBinding="{Binding Officers}"
                                SelectedValueMemberPath="RecordId"
                                UniqueName="rcbxTransportOfficer" />

Here is my xaml dictionary template:

<Style x:Name="RadComboBoxStandard"
       TargetType="telerikinput:RadComboBox"
       telerik:StyleManager.BasedOn="Office_Blue">
    <Setter Property="CanAutocompleteSelectItems" Value="True" />
    <Setter Property="CanKeyboardNavigationSelectItems" Value="True" />
    <Setter Property="ClearSelectionButtonVisibility" Value="Collapsed" />
    <Setter Property="IsEditable" Value="True" />
    <Setter Property="IsFilteringEnabled" Value="True" />
    <Setter Property="IsReadOnly" Value="False" />
    <Setter Property="MaxDropDownHeight" Value="300" /> ----- this is what makes the difference
    <Setter Property="OpenDropDownOnFocus" Value="True" />
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
    <Setter Property="TextSearchMode" Value="StartsWith" />
    <Setter Property="ToolTipService.Placement" Value="Top" />
    <Setter Property="VerticalAlignment" Value="Center" />
</Style>

Obviously, fixing this problem this way would be bad, since you never know when your combo box's collection is going to grow too large for whatever you have it set for.

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 16 Jun 2015, 03:05 PM
Hi,

You can check the Filter the Items in GridViewComboBoxColumn topic.

Let me know how the solution suggested there works for you.

Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stephen
Top achievements
Rank 1
answered on 16 Jun 2015, 03:17 PM

Adding this works (thank you)... but why?

<Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>

0
Dimitrina
Telerik team
answered on 17 Jun 2015, 08:17 AM
Hi,

We internally configure the ItemsPanel to VirtualizngStackPanel so that the performance is better when working with many items. Still, this seems to introduce issues with filtering the items.

Regards,
Dimitrina
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Stephen
Top achievements
Rank 1
answered on 17 Jun 2015, 04:53 PM
Thank you for letting me know.
Tags
GridView
Asked by
Stephen
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Stephen
Top achievements
Rank 1
Share this question
or