This is a migrated thread and some comments may be shown as answers.

Kendo Grid Throwing JS error

3 Answers 281 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 13 Feb 2013, 09:58 AM
Hi All,

I've only just started using Kendo UI stuff so please bear with me.

I have included the grid in an ASP.NET MVC 4 application in a cshtml file with the following code lifted from an example:

<h2>Administration</h2>
@Html.Kendo().Grid(Model.SystemUsersViewModels).Name("SystemUserGrid").Columns(columns =>
    {
        columns.Bound(user => user.UserName);
        columns.Bound(user => user.Email);
        columns.Bound(user => user.IsApproved);
        columns.Bound(user => user.IsLockedOut);
        columns.Bound(user => user.LastLoginDate);

    }
).Pageable().Sortable().Scrollable().Filterable().DataSource(datasource => datasource.Ajax().ServerOperation(false))

I have a simple grid being fed a collection of UserViewModels via the property SystemUsersViewModels on my view model.

I have been trying to keep the JS size down so I had originally included just the grid js, then used the custom online tool to build a kendo.custom.js, all failed to I ended up including the kitchen sink files (as far as I'm aware) and I still cannot get this to work without errors.

kendo.all.min.js
kendo.aspnetmvc.min.js

The grid renders ok with the data but I get the following error ...

Error:
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support property or method 'kendoGrid'

I've run out of ideas now, any pointers would be great.

TIA,

3 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 13 Feb 2013, 10:05 AM
Typical isn't it ...

I fixed that particular error almost immediately after posting the above thread.

However, the boolean properties are now expressed as "True" or "False" instead of being a checkbox ... hmm ...
0
Dimo
Telerik team
answered on 14 Feb 2013, 02:21 PM
Hello James,

Checkboxes for boolean fields are normally used only in edit mode. Please refer to the offline Kendo UI MVC Grid editing demos if you need help with that.

In case you require checkboxes in read mode, then you have to use a client or server column template, depending on the data binding method. Currently you are using initial server binding and subsequent Ajax binding, so you will need both templates at the same time.

All the best,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bin
Top achievements
Rank 1
answered on 24 Apr 2013, 01:53 PM
I'm new to Kendo UI for ASP.NET MVC and I got the same issue.

Could you please tell me how you solved the issue?

Thanks,
Bin
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Dimo
Telerik team
Bin
Top achievements
Rank 1
Share this question
or