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

RadAutoCompleteBox in RadGridView

1 Answer 150 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 15 Aug 2019, 08:29 AM

I have a RadGridView, in the first column is an AutoCompleteBox for searching names. I will search name and paste in to the same column. 

I have build the AutoCompleteBox in RadgridView.CellEditTemplate like this:

 

<telerik:RadAutoCompleteBox DisplayMemberPath="Name"
                                                        TextSearchMode="Contains"
                                                        TextSearchPath="Name"
                                                        SearchText="{Binding Path=Name, Mode=TwoWay}"
                                                        AutoCompleteMode="Suggest"
                                                        SelectionMode="Single"     
                                                        BoxesItemStyle="{StaticResource RadAutoCompleteBoxStyle}"
                                                        NoResultsContentTemplate="{StaticResource RadAutoCompleteBoxNoResultsContentTemplate}"
                                                        NoResultsContent="{x:Static resources:Translations.lbl_NoMatches}"
                                                        ItemsSource="{Binding Path=DataContext.Project.Customers, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}">

 

But i always get error "System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='RadWatermarkTextBox'", if i type in the column. DisplayMemberPath="Name" and SearchText="{Binding Path=Name, Mode=TwoWay}" ara in conflict. Can sameone help me?

 

Thanks in advance.

 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Aug 2019, 09:10 AM

Hello Ali,

I am not sure what does it mean that the DisplayMemberPath and SearchText are in conflict. On my side the control works as expected. I've attached my test project. Can you check it and tell me if I am missing something?

Regards, Martin Ivanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
AutoCompleteBox
Asked by
ali
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or