Processing DataSourceRequest in controller with Kendo Grid

0 Answers 141 Views
Grid
Stacey
Top achievements
Rank 1
Iron
Stacey asked on 19 Oct 2023, 06:32 PM

Hello,

 

I have a grid implemented using kendo ui for jquery.   When I pass the information to the controller, the DataSourceRequest object is not binding the filter and sort information.

They consistently are evaluating to null when running

My controller method looks like :

 

public JsonResult GetMeetingList([DataSourceRequest] DataSourceRequest request) {

  /// controller logic here

}

the payload sent to the server is, I'm posting the request. 

  1. take:
    20
  2. skip:
    0
  3. page:
    1
  4. pageSize:
    20
  5. filter[logic]:
    and
  6. filter[filters][0][operator]:
    eq
  7. filter[filters][0][value]:
    m
  8. filter[filters][0][field]:
    meetingName

Any assistance you can provide is greatly appreciated.

Stacey
Top achievements
Rank 1
Iron
commented on 20 Oct 2023, 05:48 PM

I was able to resolve this by running a simple sample project and using the Telerik Grid Controls and review the html and javascript generated.

 

I needed to change the type on the datasource to 'aspnetmvc-ajax'  which I had seen elsewhere in the forums.

 

What I was missing was including the javascript file in the kendo library /kendo-ui-2023.1.412/js/kendo.aspnetmvc.min.js

 

In case anyone else stumbles across this or even the other answer

Anton Mironov
Telerik team
commented on 24 Oct 2023, 06:44 AM

Hi Stacey,

Thank you for sharing the approach with the community.

Kind Regards,
Anton Mironov

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Stacey
Top achievements
Rank 1
Iron
Share this question
or