Action method defined in kendo MVC grid not firing

2 posts, 0 answers
  1. Cliff
    Cliff avatar
    1 posts
    Member since:
    May 2012

    Posted 15 Mar 2017 Link to this post

    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>
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2497 posts

    Posted 17 Mar 2017 Link to this post

    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.
Back to Top