pagination - How do I use a Kendo UI grid with server side paging and search form? -
i have kendo ui grid. grid built not displayed on page until search form submitted , response returned server. response result in large number of rows (depending on search parameters), serverpaging set true.
the transport property in datasource object set.
for example:
$('#resultsgrid').kendogrid({ datasource: { pagesize : 10, serverpaging: true, schema : { total: 'total' }, transport : { read: {url: '../search.x'} } } /*... more options*/ });
however, ajax call (to ../search.x) made server when pages loads. how can have ajax call made when search form submitted , prevent being called when page loads? also, how can have transport read call server original post parameters of search form when next/previous page of results requested?
set autobind
false
in grid initialization. documentation here
autobind boolean(default: true)
if set false widget will not bind data source during initialization. in case data binding occur when change event of data source fired. default widget bind data source specified in configuration.