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

Datasource with dynamic URL/data

1 Answer 644 Views
This is a migrated thread and some comments may be shown as answers.
SRKX
Top achievements
Rank 1
SRKX asked on 20 Dec 2018, 09:20 AM

I have a web application on which I have a grid which is fed by a datasource object.

The datasource essentially queries a url, but the data to be sent (transport.read.data) is actually dynamic and I would like it to be bound to some parameter of my view.

I tried to do it this way:

<kendo-datasource ref = "myDataSource"
transport-read-data-type="json"
:transport-read-url = "dataURL"
:transport-read-cache = false
:transport-read-data = "dataArgs"
schema-data="aums">
</kendo-datasource>

with dataURL and dataArgs being computed properties in my view instance.

However, when they are updated in the vue instance, the changes do not propagate to the Datasource.

Is this a known issue?

Thanks.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Dec 2018, 05:09 AM
Hi,

Yes indeed transport-read-url  property is not  reactive in DataSource component. One way to update it is to get the reference to the dataSource and change it manually and read that data again as for example it is done in this demo.  Another possible option is to use two datasources and switch them according to your case.


Regards,
Plamen
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
SRKX
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or