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

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

1 Answer 94 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
genericuser
Top achievements
Rank 1
genericuser asked on 18 May 2016, 06:52 PM

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!

1 Answer, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 23 May 2016, 10:02 AM
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.

 
Tags
HTML5, CSS, JavaScript
Asked by
genericuser
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question
or