Grid not displaying data

Ive upgraded my project from Essential Studio 1 to Essential Studio 2 and Ive followed your installation notes here, https://ej2.syncfusion.com/16.1.24/aspnet/documentation/getting-started/asp-core.html?syntax=tag

The grid displays on the view but no data is shown, the spinner is just turning, data is being returned to the view by he viewbag as I can spit it out if I loop through it


Here is my view

<ejs-grid id="Grid1" dataSource="ViewBag.dataSource" allowPaging="true">
                <e-grid-pagesettings pageCount="20"></e-grid-pagesettings>
                <e-grid-columns>
                    <e-grid-column field="Id" headerText="Id" textAlign="Right" width="120"></e-grid-column>
                    <e-grid-column field="HolidayDate" headerText="HolidayDate" width="150"></e-grid-column>
                </e-grid-columns>
            </ejs-grid>

Here is my controller

public IActionResult Holidays()
        {
            ViewBag.Title = "Holidays";
            ViewBag.dataSource = mxApplicationRepository.GetHolidays().ToList();

            return View();
        }


Is there something I am missing?

Thanks


Attachment: images_4b3e5d4e.zip

5 Replies

IR Isuriya Rajan Syncfusion Team March 29, 2018 07:16 AM UTC

Hi Gary Whiteside, 

Thanks for contacting Syncfusion support, 

We have tried to reproduce your issue in our sample  with your specific version  but we were unable to reproduce. Can you please share the below details to find out the cause of this issue. 

Share the below details : 

1.Check whether any script error occurs in your console window. If yes, Please share the screenshot 

You can check your issue with the help of  actionFailure event.This event will when the grid action failed to achieve their complete action. 


2.Here we have attached the sample if you can please revert this sample as issue reproduceable one. 

This will help us to prompt our solution. 


Regards, 
Isuriya R 



GW Gary Whiteside March 29, 2018 10:12 AM UTC

Thankyou for you reply, your example didnt display either so I changed browser from Internet Explorer to Firefoxand it worked. When I viewed my app in Firefox it also worked. Do you know what the reason could be for it not displaying records in the gird in Internet Explorer?

My version of Internet Explorer is 11.0.10240.17797


DR Dhivya Rajendran Syncfusion Team March 30, 2018 02:18 PM UTC

Hi Gary , 
  
Thanks for your update, 
In the Essential JS2 source, we have used the 'promise' for handling asynchronous actions, but the JavaScript promise doesn’t support in Internet Explorer browser. So we suggest you to use this below polyfill link in layout.cshtml to resolve this issue. Kindly please refer the below code snippet for more information.  
 
Layout.cshtml: 
    @* Syncfusion Essential JS 2 Styles *@ 
    <link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css" /> 
    @* Polyfill scripts *@ 
    <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> 
    @* Syncfusion Essential JS 2 Scripts *@ 
    <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script>  
 
We suspect that, this will solve the reported issue. Still your problem doesn’t clear please share your sample with us .We will check and update you the solution.  
Regards,
R.Dhivya  



GW Gary Whiteside March 30, 2018 02:39 PM UTC

That worked, thankyou


IR Isuriya Rajan Syncfusion Team April 2, 2018 06:46 AM UTC

Hi Gary ,  
 
We are happy to hear our suggested solution worked for you. Thanks for the update. 
 
Regards, 
Isuriya R 


Loader.
Up arrow icon