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

Search As You Type doesn't work on GridViewComboBoxColumn

1 Answer 122 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Stefania
Top achievements
Rank 2
Stefania asked on 13 Jul 2017, 03:12 PM

Hi,

I tried to use "search as you type" on my GridViewComboBoxColumn. But it doesn't work.

When I type something on the search bar doesn't found anything on grid.

<UserControl.Resources>       
        <CollectionViewSource x:Key="DirectionsCollectionViewSource" x:Name="DirectionsCollectionViewSource" />
    </UserControl.Resources>
 
......
<telerik:GridViewComboBoxColumn UniqueName="Direction" Header="Direction"
                                          DataMemberBinding="{Binding Path=Direction, UpdateSourceTrigger=PropertyChanged}"
                                          SelectedValueMemberPath="Value"
                                          ItemsSource="{Binding Source={StaticResource DirectionsCollectionViewSource}}"                                                                                                       
                                          DisplayMemberPath="Label">                   
              </telerik:GridViewComboBoxColumn>

 

Collection View Source is populated with the following values:

List<SSCStringValueObject> directions = new List<SSCStringValueObject>();
           directions.Add(new SSCStringValueObject("O", "Out");
           directions.Add(new SSCStringValueObject("I", "In");
 
           return directions;

 

Telerik version used: 2017.2.614.45

 

What am I missing? Can you provide me an example, please?

 

Thank you

1 Answer, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 18 Jul 2017, 12:11 PM
Hello Stefania,

With the current implementation of the GridViewComboBoxColumn, searching is only available if the IsLightweightMode property of the column is set to True and the DataMemberBinding is the same type as the DisplayMemberPath.

I've attached a small sample project based on your description to demonstrate how to enable search as you type in this case. Please have a look at it and let me know whether you find such an approach applicable.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Stefania
Top achievements
Rank 2
Answers by
Dilyan Traykov
Telerik team
Share this question
or