This is a migrated thread and some comments may be shown as answers.

Newbie Question about Grid in ASPNET Core

2 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oscar
Top achievements
Rank 1
Oscar asked on 11 Apr 2019, 04:25 AM

Hi,

I'm trying to test out the Grid control and it will not display on my page. If I do view/source, I can see it actually.

Steps I took:

1. Installed NuGet package: Telerik.UI.forAspNet.Core.Trial

2. Updated Startup.cs with entries for json, AddKeno()

3. Updated Views/_ViewImports to include Kendo.Mvc.UI and the tag Helper

4. Added the div below to my page (I have a controller named LineItemsController with a JsonResult function named GetLineItems)
<div class="col-md-12">
        @(Html.Kendo().Grid<LineItem>()
                                .Name("BidGrid")
                                .Columns(columns =>
                                {
                                    columns.Bound(li => li.AvailableQty).Filterable(false);
                                    columns.Bound(li => li.Category);
                                    columns.Bound(li => li.Description);
                                    columns.Bound(li => li.InstalledUnitCost);
                                    columns.Bound(li => li.MaterialCost);
                                })
                                .Pageable()
                                .Sortable()
                                .Scrollable()
                                .Filterable()                               
                                .HtmlAttributes(new { style = "height:550px;" })
                                .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .PageSize(20)
                                    .Read(read => read.Action("GetLineItems","LineItems"))
                                )
        )
    </div>

2 Answers, 1 is accepted

Sort by
0
Oscar
Top achievements
Rank 1
answered on 11 Apr 2019, 04:45 AM

Looks like I was missing links to kendo .js and .css files.
I have an existing project that I'm trying to replace my existing grid with.  

After launching the sample project, looking at _Layout.cshtml and doing my best Sesame Street (one of these things is not like the other), I was able to add/remove the correct links.


0
Viktor Tachev
Telerik team
answered on 15 Apr 2019, 12:24 PM
Hi Oscar,

Thank you for getting back and letting us know what was the origin of the issue. This can help someone facing similar behavior. 

In case additional questions rise do not hesitate to contact us again.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Oscar
Top achievements
Rank 1
Answers by
Oscar
Top achievements
Rank 1
Viktor Tachev
Telerik team
Share this question
or