Tuesday, 17 September 2013

What is the correct way to update a read url in the dataBinding event?

What is the correct way to update a read url in the dataBinding event?

For a grid, when I get the dataBinding event, I can change the url using:
this.dataSource.transport.options.read.url = 'data.acme.com/new/data';
Is this the best way to do this? Or are there getter/setter calls I should
use?
Code:
<div id="example4" class="k-content">
<div id="grid"></div>
<script>
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read:
"http://demos.kendoui.com/service/Northwind.svc/Orders"
},

No comments:

Post a Comment