Data grid nor rendering inside a Blazor control on a Razor page

I have a .new Core 3.1.2 web app with Razor pages and I am using Razor Components AKA Blazor components for some of my elements. for some reason, the data grid does not render inside a .razor Component  

I have tried almost anything and I know the data is getting to it but it just won't render.

3 Replies 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team June 25, 2020 05:50 AM UTC

Hi Ian,  
 
Thanks for contacting Syncfusion support.  
 
Query: “ the data grid does not render inside a .razor Component  I have tried almost anything and I know the data is getting to it but it just won't render. 
 
From your query we understand that you are facing issue while render a Grid control in Blazor (razor pages). We have validated the reported issue by preparing the sample with DataGrid control using our 18.1.0.59 (latest version) and we are not able to reproduce the reported issue at our end. Kindly download the sample from below and refer our getting started document for your reference 
 
 
 
After referring the sample and UG document, if you are still facing the issue. Kindly share the following details  
 
  1. Share you Syncfusion Nuget Package version.
  2. Are you facing any script error in browser console (share the screenshot of the issue).
  3. Share the details about your Grid datasource and model class properties.
  4. Kindly ensure the reported issue by upgrading the .Net Core version SDK to latest if you are using our latest version Nuget package (Syncfusion.Blazor - 18.1.0.59).
 
Above requested details will be helpful for us to validate the reported issue at our end and provide solution as soon as possible.  
 
Regards, 
Vignesh Natarajan 
 
 


Marked as answer

IA Ian Alexander June 25, 2020 08:23 AM UTC

I can not perform step 6 "Add the Syncfusion bootstrap4 theme in the <head> element of the ~/Pages/_Host.html page." My project does not have this page it has a _layout because it is not a blazer project but a razor project. I have added the script to the _layout.cshtml page but not fixing the issue


VN Vignesh Natarajan Syncfusion Team June 26, 2020 06:36 AM UTC

Hi Ian,  
 
Query: “My project does not have this page it has a _layout because it is not a blazer project but a razor project 
 
From your query we understand that you are facing issue while rendering the Blazor Components in ASP.NET Core Razor Pages application. We have prepared a sample as per your requirement. Kindly download the sample from below  
 
 
We suggest you to refer the CDN based theme file instead of referring the embedded file. Refer the below link for your reference 
    
[Layout.cshtml] 
<head> 
    <base rel='nofollow' href="~/" /> 
    <meta charset="utf-8" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 
    <title>@ViewData["Title"] - WebApplication1</title> 
    <link rel="stylesheet" rel='nofollow' href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> 
    <link rel="stylesheet" rel='nofollow' href="~/css/site.css" /> 
    <link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/blazor/18.1.59/styles/bootstrap4.css" /> 
</head> 
 
 
Kindly get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon