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

Prefix = "Grid"

2 Answers 285 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 29 Nov 2019, 04:18 PM

 

I am a complete newbie to Kendo UI. I am trying to follow the getting started exercise https://docs.telerik.com/aspnet-mvc/helpers/data-management/grid/binding/custom-binding

Step 1

public ActionResult Index([DataSourceRequest(Prefix = "Grid")] DataSourceRequest request)

{

    IQueryable<Order> orders = new NorthwindEntities().Orders;

}

It does not recognise Prefix = "Grid".   The type of namespace 'Prefix' could not be found.

I cannot work out what namespace I need to resolve this.

Any help greatly appreciated.

I am using core 2.2 , VS 2017 and Kendo-UI 2019.3.1023

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Simon
Top achievements
Rank 1
answered on 02 Dec 2019, 03:37 PM

Reply from Telerik Support

If my understanding is correct, you running an ASP.NET Core project, am I right? Note that there is a difference between the suits of Kendo UI wrappers for ASP.NET:
Telerik UI for ASP.NET MVC - Telerik UI for ASP.NET MVC allows you to use the Kendo UI widgets in .NET MVC.
Telerik UI for ASP.NET Core - Telerik UI for ASP.NET Core allows you to use the Kendo UI widgets in .NET Core.
The example referenced targets ASP.NET MVC projects, but this configuration is not available with the ASP.NET Core wrappers. For details on the ASP.NET Core suite I would advise reviewing the document section available here:
https://docs.telerik.com/aspnet-core/introduction
If the goal is to implement custom logic for filtering, paging and sorting of the data on the server I would suggest reviewing this demo on custom AJAX binding. Thie demo shows how the Telerik for ASP.NET Core Grid can retrieve a custom response when the use of the server-side extensions is not desired. The requests are sent in the expected format by the controller but the response is processed programmatically and the custom result data set is passed to the Grid. If this is not the case please share further details on the scenario you have, so I can propose an alternative solution.
I hope this clarifies the issue. Let me know you have further questions.

0
Accepted
Aleksandar
Telerik team
answered on 03 Dec 2019, 01:55 PM

Hello Simon,

To extend the below response I would like to also include the links to the cited articles. The example referenced in this article targets ASP.NET MVC projects, but this configuration is not available with the ASP.NET Core wrappers.

To utilize the built-in functionality of the Grid to handle displaying the data with paging, sorting, filtering, and grouping follow the guidelines for implementing a Kendo Grid with remote data binding. 

Implementing custom logic for filtering, paging and sorting of the data on the server is demonstrated in this demo on custom AJAX binding:

https://demos.telerik.com/aspnet-core/grid/customajaxbinding

If editing of the data in the Grid is required make sure to review the Editing section, as there are several edit modes available for the Grid - inline, incell and popup. The runnable demos would also be helpful, as they provide details on the View implementation and controller methods.

Regards,
Aleksandar
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
Simon
Top achievements
Rank 1
Answers by
Simon
Top achievements
Rank 1
Aleksandar
Telerik team
Share this question
or