Search code examples
asp.net-mvckendo-uikendo-asp.net-mvckendo-datasource

Unknown reference to Kendo Datasource


I am trying to use the KendoMVC Datasource component as shown in official page DataSource / Shared DataSource (http://demos.telerik.com/aspnet-mvc/datasource/shared-datasource), but the following errors occur:

CSHTML File
@(Html.Kendo().DataSource<ConfiguracaoAgendaViewModel>()
        .Name("dsConfiguracoes")
        .Ajax(dataSource => dataSource
           .Read(read => read.Action("ListarConfiguracoes", "ConfiguracaoAgenda").Data("GetFiltrosGrid"))
           .ServerOperation(false)
        )
    )

Error CS1061 : 'WidgetFactory' does not contain a definition for 'DataSource' and no extension method 'DataSource' accepting a first argument of type 'WidgetFactory' could be found (are you missing a using directive or an assembly reference?)

Error PrintScreen

If anyone has a tip on how to solve this problem , I will be grateful!


Solution

  • The DataSource HtmlHelper is a relatively new feature, introduced in Kendo UI version 2016.2.504. Please update the Kendo.Mvc.dll assembly (and subsequently the CSS and JavaScript files too).