0
votes

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!

1
Can you edit in at least the first two items as text instead of image? That would be easier to read and search for in the future.user812786

1 Answers

1
votes

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).