We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid not populate

Hi All
I have a problem populating a grid control
this is the code in the view
@{Html.EJ().Grid<List<DLApp.Models.Maintenance>>("HierarchyGrid")
                                                      .Datasource(ds => ds.Json(ViewBag.data))
                                                      .AllowPaging()
                                                      .Columns(col =>
                                                      {
                                                          col.Field("Cabin").HeaderText("Cabin").Add();
                                                          col.Field("Line").HeaderText("Line").Add();
                                                          col.Field("Turbine").HeaderText("Turbine").Add();
                                                          col.Field("StatusCode").HeaderText("StatusCode").Add();
                                                          col.Field("dt_to").HeaderText("dt_to").Add();
                                                          col.Field("dt_from").HeaderText("dt_from").Add();
                                                          col.Field("Timekey").HeaderText("Timekey").Add();
                                                          col.Field("AlarmDescription").HeaderText("AlarmDescription").Add();
                                                      }).Render();
}

the page appears with only the grid header but with no data.
in the source page there is the json data
What is wrong ?

page source
*****
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>DataLake</title>

    
        <link rel="stylesheet" rel='nofollow' href="/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" rel='nofollow' href="/css/site.css" />
        <link rel='nofollow' href="/lib/syncfusion-javascript/Content/ej/web/bootstrap-theme/ej.web.all.min.css" rel="stylesheet" />
        <link rel='nofollow' href="/lib/syncfusion-javascript/Content/ej/web/responsive-css/ej.responsive.css" rel="stylesheet" />
    
    
        <script type="text/javascript">
        var appInsights=window.appInsights||function(config){
            function r(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s=u.createElement(o),i,f;for(s.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",u.getElementsByTagName(o)[0].parentNode.appendChild(s),t.cookie=u.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace","Ajax"];i.length;)r("track"+i.pop());return r("setAuthenticatedUserContext"),r("clearAuthenticatedUserContext"),config.disableExceptionTracking||(i="onerror",r("_"+i),f=e[i],e[i]=function(config,r,u,e,o){var s=f&&f(config,r,u,e,o);return s!==!0&&t["_"+i](config,r,u,e,o),s}),t
        }({
            instrumentationKey: '69c54082-b256-4b9b-9245-d248b31195e1'
        });
        
        window.appInsights=appInsights;
        appInsights.trackPageView();
    </script>

</head>
<body>
    <div class="body-content">
        
<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" rel='nofollow' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel='nofollow' href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css">
    <link rel='nofollow' href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel='nofollow' href="/css/site.css" rel="stylesheet" />

</head>

<body id="myPage" data-offset="60">

    <div class="jumbotron">

        <img src="/images/falck.jpg" class="img-responsive" style="display:inline" width="200" height="200" />
        <h2 class="text-center" style="display:inline">Analytics</h2>

    </div>

    <br />

    <form class="form-inline">

        <div class="form-group">
            <label for="Sito">Sito:</label>
            <input type="text" class="form-control" id="Sito">
        </div>

        <div class="form-group">
            <label for="Turbine">Turbine:</label>
            <input type="text" class="form-control" id="Turbine">
        </div>

        <label for="startDate">Da:</label>
        <div class="form-group">
            <input id="startDate"></input>
        </div>

        <label for="endDate">a:</label>
        <div class="form-group">
            <input id="endDate"></input>
        </div>

        <div class="form-group">
            <label for="Unallocated Alarms">Unallocated Alarms:</label>
            <input type="text" class="form-control" id="Unallocated Alarms">
        </div>

        <button type="submit" class="btn btn-default" style="background-color:#B8D9C0">Filter</button>

    </form>

    <hr />


</body>
</html>


<div id="HierarchyGrid"></div>
<div class="container-fluid text-right">
        <a align="right" rel='nofollow' href="/">Return</a>
    </div>

        <hr />
        <footer>
            <p>&copy; 2016 - DataLake</p>
        </footer>
    </div>

    
        <script src="/lib/jquery/dist/jquery.js"></script>
        <script src="/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="/js/site.js?v=EWaMeWsJBYWmL2g_KkgXZQ5nPe-a3Ichp0LEgzXczKo"></script>
        <script src="/lib/syncfusion-javascript/Scripts/jsrender.min.js"></script>
        <script src="/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js"></script>
    
    
    <script type='text/javascript'>$(function($){$("#startDate").ejDatePicker({"value":"2017-01-04T10:46:46.498Z"});$("#endDate").ejDatePicker({"value":"2017-01-04T10:46:46.499Z"});$("#HierarchyGrid").ejGrid({"allowPaging":true,"dataSource":ej.DataManager({"cachingPageSize":0,"timeTillExpiration":0,"json":ej.isJSON([{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"},{"Id":0,"Cabin":"BenAketil","Line":"line","Turbine":"T01","dt_from":"2017-01-04T11:46:46.498591+01:00","dt_to":"2017-01-04T11:46:46.498591+01:00","StatusCode":"2:1","Timekey":1,"AlarmDescription":"0002 Lack of wind"}])}),"cssClass":"","columns":[{"field":"Cabin","headerText":"Cabin"},{"field":"Line","headerText":"Line"},{"field":"Turbine","headerText":"Turbine"},{"field":"StatusCode","headerText":"StatusCode"},{"field":"dt_to","headerText":"dt_to"},{"field":"dt_from","headerText":"dt_from"},{"field":"Timekey","headerText":"Timekey"},{"field":"AlarmDescription","headerText":"AlarmDescription"}]});});</script>
    

    <script src="/lib/jquery-validation/dist/jquery.validate.js"></script>
    <script src="/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>


    
</body>
</html>





3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team January 5, 2017 01:06 PM UTC

Hi Nicholas, 
 
We are unable to reproduce any problem at our end. We have prepared a sample that can be downloaded from the following location. 
 
 
Please provide the following details to reproduce the problem at our end. 
 
1)      Stacktrace of browser console (if any error) 
2)      Screenshot for the issue 
3)      If possible, modify the attached sample and reproduce the problem at our end 
 
We have also noticed, you have referred the jquery.js (locally) as well as jquery.3.1.1 (from CDN) in your code example which may also ends up in conflict and application may fail. So we suggest to use one jQuery reference in your application.  
 
Regards, 
Seeni Sakthi Kumar S. 



NP Nicholas Picardi January 5, 2017 02:02 PM UTC

Hi Seeni,

Thanks for the application sample, but my mistake is the lack of the page: "jsrender.min.js" in the syncfusion-javascript library.

Thanks for the response.

Regards,
Nicholas


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team January 6, 2017 04:24 AM UTC

HI Nicholas,  
 
We are happy to hear that your issue has been resolved. Please get back to us, if you require further assistance on this. Refer to the Help Documents. 
 
 
Regards, 
Seeni Sakthi Kumar S. 


Loader.
Up arrow icon