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

How to send Kendo Grid DataSourceRequest as ajax parameter

1 Answer 112 Views
This is a migrated thread and some comments may be shown as answers.
Adil
Top achievements
Rank 1
Veteran
Adil asked on 28 May 2020, 09:23 AM

  Hi All

Is it possible to send Kendo Grid DataSourceRequest as javascript parameter to conroller?

 

I just want to do something like this

var url = '../Dashboards/ExportCsvList';
$.ajax({
    type: "POST",
    url: url,
    traditional:true,
    data: { request: datarequest} // i want to send as paramter
    success: function (msg) {
         
    }
});

and i want to catch that as in example below

public FileResult ExportCsvList([DataSourceRequest]DataSourceRequest request)
{
           //do smth...
}

 

Is it possible?

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 01 Jun 2020, 07:52 AM

Hi, Adil,

To send parameters in such way so that they are intercepted by the DataSourceRequest, use the built in ajax transport parameter map function as demonstrated in this forum thread:

https://www.telerik.com/forums/setting-the-whole-sort-of-the-grid-from-a-single-string#Ufg9Kl_aOUGql7naDiQLKA

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Adil
Top achievements
Rank 1
Veteran
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or