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

Transport - >read -> data is not taking the dynamic data

1 Answer 455 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Rohit
Top achievements
Rank 1
Rohit asked on 07 Jun 2017, 02:40 PM

While debugging I see that the app.user.emailAddress is showing up, but not passing as a header. Is there anything I am missing?

   dataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: dataProvider.url + '/ReadProducts',
                        ContentType: 'application/json; charset=utf-8',
                        type: 'POST',
                        data: { "userEmailID": app.user.emailAddress }
},

 parameterMap: function (data, type) {
                    JSON.stringify(data);
                }

 

 

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 09 Jun 2017, 01:16 PM
Hi Rohit,

Setting dynamic data on transport.read.data property works as expected on my end. In the following dojo I tried to recreate your case:


If you inspect the DevTools (F12) you will notice that the parameter is attached to the request, check out the following screenshot: 


Please modify the above demo, so that the behavior you are observing is available and send it back to us, so we can investigate locally your exact case and help you more efficiently.


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MVVM
Asked by
Rohit
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or