Kendo grid filters via POST

1 Answer 96 Views
Filter Grid
Alban
Top achievements
Rank 1
Iron
Alban asked on 16 Aug 2021, 08:56 AM | edited on 16 Aug 2021, 09:30 AM

Hi, 

I am working on an already existing kendo grid that gets the data from the server. 

The grid has filters enabled and I can see the calls being made (under Chrome developer tools -> network) when i filter the data.

However, the calls being made are of the GET type (with the filter data on the URL), is there a way to change the request method from GET to POST?

Currently I can see the call being made as this when i apply the filter "Side = sell":

http://mywebsite.com/get_orders/account-1?take=150&skip=0&page=1&pageSize=150&filter%5Blogic%5D=and&filter%5Bfilters%5D%5B0%5D%5Bfield%5D=SIDE&filter%5Bfilters%5D%5B0%5D%5Boperator%5D=contains&filter%5Bfilters%5D%5B0%5D%5Bvalue%5D=sell

thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 19 Aug 2021, 07:18 AM

Hi, Alban,

The Grid calls the Read method any time you utilize a server operation(sorting, filtering, paging, grouping, aggregating).

You can change the type of the request through the transport.read configuration:

dataSource: {
                    transport: {
                        read: {
                          url: "remote/service/endpoint",
                          type: "POST"
                        }
                    }
}

 

Best Regards,
Georgi Denchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Filter Grid
Asked by
Alban
Top achievements
Rank 1
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or