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

Filtering in Internet Explorer

7 Answers 60 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Adrian
Top achievements
Rank 1
Adrian asked on 06 Apr 2017, 07:21 PM

Im using DropDownList with remote data binding and it works great on Firefox and Chrome, but there is an issue with filtering on Internet Explorer. After few keystrokes it selects top filtered position automatically instead of just filter out unmatching positions. 

 

Code i use:

01.Html.Kendo().DropDownList()
02..Name("DropDown")
03..DataTextField("Text")
04..DataValueField("Value")
05..Filter(FilterType.Contains)
06..DataSource(source =>
07.    source.Read(read =>
08.    {
09.        read.Action("ReadMethod", "Applications");
10.    }))
11..Events(e =>
12. {
13.     e.Select("onSelect");
14.     e.DataBound("onLoad");
15. })

 

Is there anything that can be done to fix that?

7 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 07 Apr 2017, 03:08 PM
Hello Adrian,

I was not able to reproduce the described behavior at my end. Could you elaborate more on the following points:
1. If there are specific steps that need to be followed in order for the issue to be exhibited could you share them?
2. Is the unexpected behavior reproducible in any of our demos, for example in the Client Filtering or the Server Filtering demos, in which the DropDownList is configured similarly to yours?
3. If there is any additional custom logic in the DataBound event handler that could be interfering with the DropDownList built-in behavior could you post it?

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Adrian
Top achievements
Rank 1
answered on 09 Apr 2017, 02:59 PM

[quote]
1. If there are specific steps that need to be followed in order for the issue to be exhibited could you share them?

[/quote]

There are no additional steps beside typing letters into filter field.

 

[quote]
2. Is the unexpected behavior reproducible in any of our demos, for example in the Client Filtering or the Server Filtering demos, in which the DropDownList is configured similarly to yours?

[/quote]

Both examples works fine in Internet Explorer.

 

[quote]
3. If there is any additional custom logic in the DataBound event handler that could be interfering with the DropDownList built-in behavior could you post it?
[/quote]

Strangely enough when I took out all the events and configured my DropDownList exactly like one in demo (ofcourse populating it with my own read method) the problem still occurs. In my read method in controller I return list of SelectItems with Json method, like so:

List<SelectItem> selectList = new List<SelectItem>();
//list populating logic...
return Json(selectList, JsonRequestBehavior.AllowGet);

Since I think I got rid of everything on client side that could interfere with widget behavior I have no idea what else could it be.

 

0
Ivan Danchev
Telerik team
answered on 11 Apr 2017, 01:26 PM
Hello Adrian,

Have you debugged you ReadMethod action? Is the expected collection of items returned based on the text typed in the DropDownList? Here's an exemplary action that works correctly at my end:
public JsonResult GetProducts(string text)
{
    var products1 = new List<SelectItem>();
 
    products1.Add(new SelectItem { Text = "anna", Value = "1" });
    products1.Add(new SelectItem { Text = "alice", Value = "2" });
    products1.Add(new SelectItem { Text = "bob", Value = "3" });
    products1.Add(new SelectItem { Text = "ben", Value = "4" });
    products1.Add(new SelectItem { Text = "daniel", Value = "5" });
    products1.Add(new SelectItem { Text = "donald", Value = "6" });
 
    if (!string.IsNullOrEmpty(text))
    {
        products1 = products1.Where(p => p.Text.Contains(text)).ToList(); ;
    }
 
    return Json(products1, JsonRequestBehavior.AllowGet);
}


Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Adrian
Top achievements
Rank 1
answered on 11 Apr 2017, 09:30 PM
I took above exemplary ReadMethod action and it returns correct collection based on text typed in filter, but DropDownList still closes itself instead of wait for user to select value.
0
Ivan Danchev
Telerik team
answered on 12 Apr 2017, 12:52 PM
Hello Adrian,

There has been a similar DropDownList issue in previous Kendo UI versions, but it has been fixed and should not be reproducible with the latest official version. I would suggest checking out the version of the Kendo js files loaded as well as the version of the Kendo.MVC.dll assembly referenced in your project. A version older than 2017.1.223 (as specified in the ticket's info)  referenced, could explain why the issue is not replicated in our demos but can be observed in your project.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Adrian
Top achievements
Rank 1
answered on 20 Apr 2017, 09:58 AM

Well, it's embarrasing that I didn't check the latest version.With new version problem is indeed gone.

 

Thank you for your help.

0
Ivan Danchev
Telerik team
answered on 21 Apr 2017, 10:31 AM
Hi Adrian,

Thank you for getting back to us. I am glad we were able to narrow down the cause for the issue and that it is not reproducible in the latest Kendo UI version.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Adrian
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Adrian
Top achievements
Rank 1
Share this question
or