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

Kendo UI Vue, Sorting always null on API (DataSourceRequest)

2 Answers 333 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chrismayana
Top achievements
Rank 1
Chrismayana asked on 16 Mar 2020, 04:56 AM

Hi,

I'm new on the Kendo UI for Vue, 

I Have some difficulty when working on in sorting, for some reason the sorting model value always null, I'm using DataSourceRequest model.

API 

[HttpGet("grid")]
public IActionResult ListGrid([DataSourceRequest] DataSourceRequest request) {
  // My code here
 }

 

Vue

<kendo-datasource ref="datasource1"
                           :transport-read-url="'/api/service/grid'"
                           :transport-read-data-type="'json'"
                           :server-paging="true"
                           :page-size="2"
                           :schema-data="'data'"
                           :schema-total="'total'"
                           :server-filtering="true"
                           :server-sorting="true">
         </kendo-datasource>
 
         <kendo-grid ref="grid"
                     :data-source-ref="'datasource1'"
                     :pageable='true'
                     :sortable="true"
                     :filterable="true"
                     :sortable-mode="'multiple'"
                     :sortable-allow-unsort="true"
                     :sortable-show-indexes="true">
             <kendo-grid-column title="Name" field="name"
                                :filter-search="true"></kendo-grid-column>
             <kendo-grid-column title="Description"></kendo-grid-column>
             <kendo-grid-column title="Users" field="relatedUser"></kendo-grid-column>
             <kendo-grid-column title="Active" field="isActive"
                                :template="activeTemplate"></kendo-grid-column>
             <kendo-grid-column :template="editbutton" :width="80"></kendo-grid-column>
         </kendo-grid>

 

Please help me,

Best Regards

 


2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 17 Mar 2020, 03:23 PM

Hi,

I am currently working on a sample and will share it in this thread when it is ready.

Regards,
Plamen
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Plamen
Telerik team
answered on 18 Mar 2020, 07:03 AM

Hello,

I am attaching an example how to use Kendo Vue Wrapper Grid with server filtering and sorting with DataSourceRequest in ASP.Net Core application.

The important part here is to have the  :type="'aspnetmvc-ajax'" and the 'kendo.aspnetmvc.min.js' script included together with the Kendo scripts so that the request is passed correctly to the server.

Hope this information will be helpful.

Regards,
Plamen
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Chrismayana
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or