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

Action method defined in kendo MVC grid not firing

1 Answer 443 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cliff
Top achievements
Rank 1
Cliff asked on 15 Mar 2017, 05:01 PM

I have implemented a MVC controller which returns data. However that data is not getting bound to the kendo MVC grid. On further inspection, I have noticed is that the action method defined in the kendo grid isn't getting called. 

When I check the developer tools I can see the following errors

 

Team:78 Uncaught ReferenceError: kendo is not defined
    at Team:78
glyphicons-halflings-regular.woff2 Failed to load resource: the server responded with a status of 404 (Not Found)
glyphicons-halflings-regular.woff Failed to load resource: the server responded with a status of 404 (Not Found)


<p>    </p><div class="reCodeBlock" style="border:solid 1px #7f9db9;width:10;height:10;overflow-y:auto;"><div style=" background-color: #fff;"><span style=" "><span style=" margin-left: 0px !important;"><code style="color: #000;">@(Html.Kendo().Grid<</code><code style="color: #069;font-weight: bold;">CC.GRP.MCRequest.Models.TeamIn</code><code style="color: #000;">>()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Name("GridTeam")<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Columns(columns =><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    {<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        columns.Bound(o => o.TeamID).Groupable(false);<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        columns.Bound(o => o.CountryCode);<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        columns.Bound(o => o.TeamName);<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        columns.Bound(o => o.TeamDescription);<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    })<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Pageable()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Sortable()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Filterable()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Scrollable()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .Groupable()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    .DataSource(dataSource => dataSource<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        .Ajax()<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>        .Read(read => read.Action("Team_Read", "Admin"))<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    )<</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">><</code><code style="color: #069;font-weight: bold;">br</code><code style="color: #000;">>    )</code></span></span></div></div>

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 17 Mar 2017, 02:02 PM
Hi Cliff,

The error you are seeing can be observed if some or all of the script files are not loaded correctly. Please ensure that kendlo.all.min.js and kendo.aspnetmvc.min.js are referenced in the application and loaded correctly on the client. Also, make sure that the files are added in the correct order.

<script src="/Scripts/kendo.all.min.js"></script>
<script src="/Scripts/kendo.aspnetmvc.min.js"></script>

Alternatively, you can use the CDN service that is available. Please examine the article below that describes in more detail how you can use CDN to load the script and styles files.



Regards,
Viktor Tachev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Cliff
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or