Hi,
I have Listview with pager. on search change event am binding listview and pager using data source. on first binding listview and pager is working properly but not in successive binding. listview is refreshing in successive binding but pager is not. (its adding one more row (attachment))
below is my code:
HTML:
I have Listview with pager. on search change event am binding listview and pager using data source. on first binding listview and pager is working properly but not in successive binding. listview is refreshing in successive binding but pager is not. (its adding one more row (attachment))
below is my code:
HTML:
<div> <input type="search" id="fieldSearch" placeholder="search..."> <div id="listView" style="height: 325px; overflow: auto;"> </div> <div class="k-pager-wrap"> <div id="pager"> </div> </div> </div>Jquerry:
$(document).ready(function () {}$("#fieldSearch").live("change", Search);
function Search() { var tSearchText = $("#fieldSearch").val(); var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://...." + tSearchText, dataType: "json" } }, pageSize: 12 }); $("#pager").kendoPager({ dataSource: dataSource }); $("#listView").kendoListView({ dataSource: dataSource, selectable: "single", dataBound: onDataBound, change: function (e) { onChange(e) }, template: kendo.template($("#Template").html()) }); }
<script type="text/x-kendo-tmpl" id="Template"> <div style="height:27px; cursor: pointer;"> <span>${Name}</span> </div> </script>