Reputation: 1
I am using .NET 4 MVC. I am just trying to create a very simple grid functionality. When I try to run the application I am getting
Object doesn't support property or method 'kendoGrid' error.
Any ideas on how to fix this?
Here are the code snippets
public ActionResult Products_Read([DataSourceRequest] DataSourceRequest request)
{
var mock = new MaintainEmployeeMock();
return Json(mock.GetEmployeeInfoForAdminScreen().ToDataSourceResult(request));
}
View:
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.EMP_ID).Groupable(false).Width(100);
columns.Bound(p => p.FName).Width(120);
columns.Bound(p => p.MName).Width(100);
columns.Bound(p => p.LName).Width(120);
columns.Bound(p => p.Emp_Type).Width(100);
columns.Bound(p => p.Emp_Shift).Width(100);
columns.Bound(p => p.Menu_Level).Width(100);
columns.Bound(p => p.Super_ID).Width(100);
columns.Bound(p => p.Active_Y_N).Width(50);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Products_Read", "EmployeeAdmin"))
)
)
Upvotes: 0
Views: 1810
Reputation: 20233
All the possible reasons for such error are covered in the troubleshoot section here.
I assume you either load the jQuery library too many times, or you do not load the kendo scripts at all.
Upvotes: 2
Reputation: 472
Is that all your view code? Check if there is any javascript not being rendered on the page.
Also, as Brett pointed out, you have to make sure that all necessary JS is included either by using cdn or putting the files on your app structure.
Another thing, are you trying to access the grid client side?
Upvotes: 0