I have a dataSource that is configurable by the user. Programmatically, that means I want to set the pageSize each time before I do the .read() on the dataSource.
But I am finding (version 515) using Fiddler that when I change the pageSize (the datasource fires off a read (with no parameters) and then when the read() happens a few lines later there is a second getURL request:
I want to configure the DataSource so that it is only fired manually.
Here is another oddity, this double HTTP Get only happens once. The next time I proceed through the code, setting pageSize() does not cause an HTTP Get, (only the .read() does).
Just to make this more clear the setting .pageSize() fires this request
GET /SearchBoxInRange HTTP/1.1
and two lines later the searchData.read() fires of this request:
GET /SearchBoxInRange?requestBox=((42.23903905725251%2C+-71.22695843505858)%2C+(42.49270487579739%2C+-70.90904156494139))&within=false HTTP/1.1
The second is the correct one. The first is spurious.
But I am finding (version 515) using Fiddler that when I change the pageSize (the datasource fires off a read (with no parameters) and then when the read() happens a few lines later there is a second getURL request:
I want to configure the DataSource so that it is only fired manually.
Here is another oddity, this double HTTP Get only happens once. The next time I proceed through the code, setting pageSize() does not cause an HTTP Get, (only the .read() does).
Just to make this more clear the setting .pageSize() fires this request
GET /SearchBoxInRange HTTP/1.1
and two lines later the searchData.read() fires of this request:
GET /SearchBoxInRange?requestBox=((42.23903905725251%2C+-71.22695843505858)%2C+(42.49270487579739%2C+-70.90904156494139))&within=false HTTP/1.1
The second is the correct one. The first is spurious.
var pagesize = $("#PageSizeSelect").data("kendoDropDownList").value();
alert("page size is now: " + pagesize);
searchData.pageSize(parseInt(pagesize));
// makes a second request - which works and has the new pagesize set
// searchData is a kendo dataSource object
searchData.read(searchBox);