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

Filter not working with ItemTemplate

2 Answers 83 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Darius
Top achievements
Rank 1
Darius asked on 05 Sep 2019, 07:12 PM

Hello,

I'd like to implement filtering for a RadComboBox that uses ItemTemplate. However, when I run application, the combobox does not accept keyinput and there is no filtering done. Thank you in advance for any help.

My code:

<telerik:RadComboBox filter="Contains" ID="ddl" runat="server" name="ddl"
        
                   Width="530px" MaxHeight="200" Skin="Windows7">
                    
                   <ItemTemplate>
                        
                           <span title='<%# Eval("tooltipText") %>' class='<%# Eval("GS") %>'>
                               <%# Eval("ElementA") %></span>
                            
                            
                   </ItemTemplate>
               </telerik:RadComboBox>

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 10 Sep 2019, 01:43 PM
Hello Darius,

I've tried with the following configuration and it works properly on my side:
<telerik:RadComboBox Filter="Contains" ID="ddl" runat="server" name="ddl"
    Width="530px" MaxHeight="200" Skin="Windows7" DataTextField="ElementA">
    <ItemTemplate>
        <span title='<%# Eval("ElementA") %>' class='<%# Eval("ElementA") %>'>
            <%# Eval("ElementA") %></span>
    </ItemTemplate>
</telerik:RadComboBox>

C#:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        ddl.DataSource = Enumerable.Range(1, 6).Select(x => new { ElementA = "Item " + x });
        ddl.DataBind();
    }
}

Perhaps, there is some hidden javascript issue preventing the correct functioning of the combo control:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax

Regards,
Eyup
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.
0
Darius
Top achievements
Rank 1
answered on 10 Sep 2019, 05:21 PM
Thank you Eyup. That was the problem -- as soon as I cleaned up script references on the master page and usercontrol, the filtering on the combo control is working.
Tags
ComboBox
Asked by
Darius
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Darius
Top achievements
Rank 1
Share this question
or