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

[Solved] Combo box bug(?) when using filtering and one of the display text is empty

1 Answer 19 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sang
Top achievements
Rank 1
Sang asked on 18 May 2011, 10:03 AM
Combo box errors out (i.e. Firebug shows error message: g.toLowerCase is not a function) when one of the display text is an empty text and if you chose .Filterable

To replicate, use the example below and try to type any text in the box - like e - and the combo box will not select the second item, but the browser status will show that it has an error.

I would like to see filtering work despite of having one of the "Text" being empty.  Temporary workaround I am using is to populate the empty text value with some dummy text, so the combo box does not error out.

I am using version: 2011.1.315
---
Controller
public ActionResult Test()
{
    var list = new List<SelectListItem>
    {
        new SelectListItem
            {
                Selected = true,
                Value = "v1",
                Text = ""
            },
            new SelectListItem
            {
                Selected = false,
                Value = "v2",
                Text = "Second Choice"
            }
    };
    var sel = new SelectList(list, "Value", "Text");
    return View(sel);
}

View
@model SelectList
@(Html.Telerik().ComboBox()
            .Name("ComboBox")
            .SelectedIndex(0)
            .BindTo(Model)
            .Filterable(filtering  => filtering.FilterMode(AutoCompleteFilterMode.Contains))
)

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 20 May 2011, 10:21 AM
Hello Sang,

 
Thank you for drawing our attention to this issue.

The problem will be addressed with the next official release of Telerik extensions for ASP.NET MVC. The fix also will be available in the next internal build.

I have updated your Telerik points.

Regards,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Sang
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or