Search code examples
c#blazor

Blazor RadzenDataGrid not showing pretty grid


Hoping someone can help me find the issue. Im really new to blazor, so if its a obvious mistake, dont yell at me :D

Im making a basic data grid that pulls data from a database and displays it using RadzenDataGrid.

I've made the grid, but for some reason it just shows a basic table on the page, it doesnt have that nice sorting and filtering options or the usual data grid looks.

Any suggestions what might be wrong? I thought its supposed to automatically make it pretty with the tables and everything. Something more like this: enter image description here


Solution

  • make sure you are using necessary JS and CSS reference in your wwwroot/index.html or _Host.cshtml

    <link rel="stylesheet" href="_content/Radzen.Blazor/css/default.css">
    
    <script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
    

    the script tag should be before the closing </body>

    I noticed that one of your columns has a Property="" which is empty. This may potentially cause an issue. Each column needs to be bound to a property of EMIR_AssementResults

    Please see readme Get started with Radzen Blazor Components section