Hi,
im using mvc to bind my autocomplete list and use it,to do so,my controller is like:
public Jsonresult Index()
{
//List of parks and turbines while searching
var turbineWindparkList=(from d in DB.Accessinfo
select new OverViewAutoComeplete {
ParkName=d.windpark_name,
TurbineName=d.turbine_name
}).Take(10).ToList();
return Json(turbineWindparkList, JsonRequestBehavior.AllowGet);
}
in my view :
<div><input id="inputAutoComplete" /></div>
<script type="text/javascript">
@(Html.Kendo().AutoComplete()
.Name("inputAutoComplete") //The name of the AutoComplete is mandatory. It specifies the "id" attribute of the widget.
.DataTextField("ParkName") //Specify which property of the Product to be used by the AutoComplete.
.DataSource(source =>
{
source.Read(read =>
{
read.Action("Index", "Overview"); //Set the Action and Controller names.
})
.ServerFiltering(true); //If true, the DataSource will not filter the data on the client.
})
)
i dont know whats wrong with my controller which i cant reach to view on page load,and even if i use Actionresult to reach view,i get javascript error on the part razor command