I'm using the KendoUI for MVC Autocomplete extension with a Telerik MVC Extensions Grid and the Autocomplete is not displaying the available suggestions in a drop down list, and it's not "suggesting" anything even though I have .Suggest(true).
I have this in the Head section of the _layout.cshtml view...
... and this in the Global.asax file for the Shared stylesheets.
Am I missing something?
This is the HTML of the view.
This is my controller action.
Any ideas?
Thanks.
I have this in the Head section of the _layout.cshtml view...
@{Html.Telerik().StyleSheetRegistrar().StyleSheets(group => group.AddSharedGroup("SharedStyleSheets")).Render();}<script src="@Url.Content("~/Scripts/2012.2.423/jquery.min.js")" type="text/javascript"></script><script src="@Url.Content("~/Scripts/2012.2.423/kendo.web.min.js")" type="text/javascript"></script><script src="@Url.Content("~/Scripts/2012.2.423/kendo.aspnetmvc.min.js")" type="text/javascript"></script>... and this in the Global.asax file for the Shared stylesheets.
SharedWebAssets.StyleSheets(group => group .AddGroup("SharedStyleSheets", styles => styles .Add("2012.1.419/telerik.common.min.css") .Add("2012.1.419/telerik.web20.min.css") .Add("2012.2.423/kendo.common.min.css") .Add("2012.2.423/kendo.blueopal.min.css") .Combined(true) .Compress(true) ));Am I missing something?
This is the HTML of the view.
@using (Html.BeginForm(MVC.Ctaf.SelectItems(), FormMethod.Post)){ <fieldset> <legend>Filter</legend> <p class="colx2-left"> Class Name: @(Html.Kendo().AutoComplete() .Name("classname") .DataTextField("Class") .DataSource(source => { source.Read(read => { read.Action("_AutocompleteClasses", "Ctaf"); }).ServerFiltering(false); }) .Suggest(true) ) </p> <p class="colx2-left"> Subclass Name: @Html.TextBox("subclassname") </p> <p style="clear:both;"> <input type="submit" value="Filter" /> </p> </fieldset> }<p> </p>@{Html.Telerik().Grid(Model.CtafList).Name("CtafGrid") .Columns(column => { column.Bound(c => c.Id) .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= Id #>' />") .Title("") .Width(36) .HtmlAttributes(new { style = "text-align:center" }); column.Bound(c => c.Class); column.Bound(c => c.Subclass); column.Bound(c => c.Title); }) .DataBinding(dataBinding => dataBinding.Ajax() .Select("_CheckBoxesAjax", "Ctaf")) .Scrollable() .Pageable(pager => pager.PageSize(40)) .Render(); }This is my controller action.
public virtual ActionResult _AutocompleteClasses(){ stringresult = _ctafService.Get().Select(c => c.Class).Distinct().ToList(); return Json(result, JsonRequestBehavior.AllowGet);}Any ideas?
Thanks.