RadAutoCompleteBox in RadGridView

2 posts, 0 answers
  1. ali
    ali avatar
    5 posts
    Member since:
    Jan 2019

    Posted 15 Aug Link to this post

    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.

     

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2245 posts

    Posted 19 Aug Link to this post

    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.
Back to Top