This question is locked. New answers and comments are not allowed.
Environment:
- ASP.NET MVC 3
- VB.NET
- Razor ViewEngin
- Telerik MVC 2011-Q1.
I have a strange problem with the Combobox control.
If I run the following code in a View then "0" will be inserted as the first item when I press the "down" arrow,
@(Html.Telerik().ComboBox() _ .Name("iComputerId") _ .AutoFill(True) _ .OpenOnFocus(False) _ .HighlightFirstMatch(True) _ .Items(Function(item) item.Add().Text("Item1").Value("1")) _ .SelectedIndex(0))But, if I run this code (note .value("0")), then the combobox will work as expected (i.e. only display "Item1").
@(Html.Telerik().ComboBox() _ .Name("iComputerId") _ .AutoFill(True) _ .OpenOnFocus(False) _ .HighlightFirstMatch(True) _ .Items(Function(item) item.Add().Text("Item1").Value("0")) _ .SelectedIndex(0))The same problem occur if I bind the Combobox to a database and this causes a serious problem since it is very likely that there will not be any item that has "0" as its primary key i the queries I make.