Aurelia Kendo UI Bridge List View Datasource url pass parameters to the service call

2 posts, 0 answers
  1. genericuser
    genericuser avatar
    3 posts
    Member since:
    May 2009

    Posted 18 May Link to this post

    I am New to aurelia and Kendo UI. I am trying to use Kendo UI list view. The code give in the docs is:

     

    dataSource = new kendo.data.DataSource({
        transport: {
          read: {
            url: '//demos.telerik.com/kendo-ui/service/Products',
            dataType: 'jsonp'
          }
        },
        pageSize: 21
      });

     

    I want to pass parameters in body for the url, is there any way to achieve it? I mean make a POST call to web api which is async.
    Thanks in advance!

  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 23 May Link to this post

    Hi,

    I am not familiar with the Aurelia bridge for Kendo UI, but using the Kendo UI data source component you may consider the following approaches.

    You can use a custom function for the transport.read setting and make the request to the service as you'd like.

    You can also use the jQuery AJAX (Kendo UI data source uses jQuery AJAX behind the scenes to make the request) settings to configure the request parameters and send them correctly to your service as explained here.

    You can also use the transport.parameterMap to modify and adjust the parameters before the request is made.

    I hope that this works for you.

    Regards,
    Anton Dobrev
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top