Reputation: 3938
Let's say I have this kind of simple dataSource:
var TasksSource = new kendo.data.DataSource({
transport: {
read: {
url: 'some url',
dataType: "json"
}
}
});
And I want to use it several times, but with different urls. I couldn't find anywhere how to pass this to dataSource. And I don't want to use global variable. I was trying with custom methods, like for example setUrl: function() .. etc
but eventually it didn't work
Upvotes: 2
Views: 4950
Reputation: 3279
Once you create the DataSource, set the url value like this:
TasksSource.transport.options.read.url = "Test";
Upvotes: 5