I am unable to display data in Telerik Grid. in asp.net core mvc in VS2019.

1 Answer 58 Views
Grid
Sai Nithesh
Top achievements
Rank 1
Sai Nithesh asked on 01 Nov 2021, 08:01 PM

Hi All, 

Please find the attachment for my project and DB script. Due size issue i am sharing only few files excep ref files. I am displaying data in Home.cshtml. After login youser details are displayed in Home.cshtml page. Added MVC HTML helper tabel and Telerik Grid to display data based on the user login.

But Telerik grid data is not displaying i dont know what is my mistake. Same thing i did in Telerik MVC there it works fine but in core mvc telerik grid is not working as expected.

Data displaying in HTML helper tables but not displaying in Telerik Grid control. I need to submit this test project for client approval please henp me to use telerik grid in Coremvc.

Sample Screens:

Error in ;

Please find the attachemnt for project File and script.

1 Answer, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 04 Nov 2021, 10:05 AM

Hi, Sai,

The JavaScript error that you observe comes from client-side resources. It indicates that the kendo.all.min.js file has not been loaded. I could see that you have referenced in a section with environment 'Development'. Ensure that you are running the project with that specific environment.

Alternatively, add the script references in the head of the _Layout.cshtml file:

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - Sample</title>

    <link href="https://kendo.cdn.telerik.com/2021.3.914/styles/kendo.common-material.min.css" rel="stylesheet" type="text/css" />
    <link href="https://kendo.cdn.telerik.com/2021.3.914/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
    <link href="https://kendo.cdn.telerik.com/2021.3.914/styles/kendo.material.min.css" rel="stylesheet" type="text/css" />

    <script src="https://kendo.cdn.telerik.com/2021.3.914/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.3.914/js/jszip.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.3.914/js/kendo.all.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2021.3.914/js/kendo.aspnetmvc.min.js"></script>

    <environment names="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/css/site.css" />
    </environment>
</head>

Let me know if the issue persists.

 

Regards,
Tsvetomir
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Sai Nithesh
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Share this question
or