I am currently working with KendoUI using ASP.Net MVC Razor syntax.
I have drop downlists and editor widgets that are working well.
Problem came up when I needed to bind an event to a JS function.
I followed the docs found here: http://demos.telerik.com/kendo-ui/web/dropdownlist/events.html
In my partial view:
@(Html.Kendo().DropDownListFor(model => model.ClientType)
.DataSource(ds => ds.Read(read => read.Action("FetchAllClientTypes", "ClientType")))
.DataTextField("Description")
.DataValueField("Id")
.AutoBind(true)
.ToClientTemplate()
.Events(e => e.Change("Test"))
)
@Html.ValidationMessageFor(model => model.ClientType)
But,on building, I get the error:
Error 67 'System.Web.Mvc.MvcHtmlString' does not contain a definition for 'Events' and no extension method 'Events' accepting a first argument of type 'System.Web.Mvc.MvcHtmlString' could be found (are you missing a using directive or an assembly reference?) C:\WorkingForlder_Details.cshtml 193 32 NameSpace.ToApplication
NB: The data binding and everything else works. It is the Event Binding that's failing
Any idea why its failing to build?