GridViewComboBoxColumn AutoComplete Virtualization Issue...

5 posts, 0 answers
  1. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 15 Jun 2015 Link to this post

    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.

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 16 Jun 2015 Link to this post

    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
  3. DevCraft banner
  4. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 16 Jun 2015 in reply to Dimitrina Link to this post

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

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

  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Jun 2015 Link to this post

    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
  6. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 17 Jun 2015 in reply to Dimitrina Link to this post

    Thank you for letting me know.
Back to Top
DevCraft banner