This question is locked. New answers and comments are not allowed.
Hello
I am using telerik grid and one of its columns is autocomplete textbox.
syntax for grid column is :
col.Bound(r => r.BANK_NAME).EditorTemplateName("BankAutoComplete").Width(150);
and inside editor template is following code.
method to fetch values is as follows:
but when I run the application and try to enter characters in autocomplete textbox, I get following error when see in console in Firebug:
and error line shown is as follows:
http://localhost:52946/asset.axd?id=_gEAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8Uezjx597xd_tPro0Uevp3Wxapu7ezu7e-O98ac7Dz4afXTOXy_p6zYv87p4O55Wi0W1HP90Q99WHz3a-SWj8PtZnV1ky9msrla20W630VWxnFVX9vu97vdt_q6dVO9sg3vdBhd1MbPf7ke_PS_Klv5aXth297vtyqJp7befdr_N1m1Fo12VeZvbVg-6raZZmS9nWW1bHPQokrX5qpi-zV2bh1GM81nR-vju9oi7yJdr9_XuL_n-L_n-6KNpyy3etXd_OrvMGp5GanFJnwZzOaW5vvfpffrlo0dtvc5_yf8TAAD__5mX647-AQAA (Line 7)
So, what is the problem? This telerik grid also has one more auto compete but that works fine. So what can be the problem?
Is it like the values fetched as list if have some characters which can raise the error?
I am using telerik grid and one of its columns is autocomplete textbox.
syntax for grid column is :
col.Bound(r => r.BANK_NAME).EditorTemplateName("BankAutoComplete").Width(150);
and inside editor template is following code.
@(Html.Telerik().AutoComplete() .Name("BANK_NAME") .HtmlAttributes(new { onkeydown = "if (KeyPress){KeyPress(event);}" }) .BindTo(MembershipController.GetBankList()) .HighlightFirstMatch(true) .AutoFill(true) .Filterable(filtering => { filtering.FilterMode(AutoCompleteFilterMode.StartsWith); }) )method to fetch values is as follows:
public static IEnumerable<string> GetBankList() { var bankList = DatabaseHelper.Instance.Database.Query<Dad_Membership>("SELECT DISTINCT BANK_NAME FROM DAD_MEMBERSHIP").ToList(); List<string> list = new List<string>(); foreach (Dad_Membership h in bankList) { list.Add(h.BANK_NAME); } return list.ToList(); }but when I run the application and try to enter characters in autocomplete textbox, I get following error when see in console in Firebug:
TypeError: o is null
and error line shown is as follows:
http://localhost:52946/asset.axd?id=_gEAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8Uezjx597xd_tPro0Uevp3Wxapu7ezu7e-O98ac7Dz4afXTOXy_p6zYv87p4O55Wi0W1HP90Q99WHz3a-SWj8PtZnV1ky9msrla20W630VWxnFVX9vu97vdt_q6dVO9sg3vdBhd1MbPf7ke_PS_Klv5aXth297vtyqJp7befdr_N1m1Fo12VeZvbVg-6raZZmS9nWW1bHPQokrX5qpi-zV2bh1GM81nR-vju9oi7yJdr9_XuL_n-L_n-6KNpyy3etXd_OrvMGp5GanFJnwZzOaW5vvfpffrlo0dtvc5_yf8TAAD__5mX647-AQAA (Line 7)
So, what is the problem? This telerik grid also has one more auto compete but that works fine. So what can be the problem?
Is it like the values fetched as list if have some characters which can raise the error?