剑道电网
问题描述:
嗨如何让选择页码我非常新剑道UI,让需要帮助的在下面的修复,剑道电网
我使用的剑道格UI如下的分页: <script>
$(document).ready(function(){
$("#table3").kendoGrid({
dataSource: {
pageSize: 10
},
pageable: true,
enter code here
高度:300, sortable: true,
}); $("#table3").show();
});
</script>
,他重定向与记录的详细信息编辑页面,所以我需要当前的页码,因为在一个页面编辑一条记录后,我需要用户重定向到保存该记录的详细信息后,保存同一页面。 我正在Coldfusion页面中使用它。 请帮忙。
在此先感谢
答
你所追求的是在这里:
http://docs.kendoui.com/api/web/pager#methods-page
// get the page
var currentPage = grid.dataSource.page();
// later set the page
grid.dataSource.page(currentPage);
但我对重定向有点糊涂了从电网到编辑页面,你为什么这样做? Kendo具有内联批量编辑和弹出编辑功能,如果您移动到其他页面,它会变得更复杂一点。
答
// declare page index as 1
var currentPage = 1;
pageable: {
change: function (e) {
currentPage = e.index;
},
page: currentPage,
sortable: true,
..`enter code here`
}
$scope.grid = dataSource;
$scope.grid._page = currentPage;// stay in the current page after grid refreshes
+0
请详细解释您的答案,请参阅[如何编写好的答案?](http://*.com/help/how-to-answer) – agold
非常感谢你的帮助。是的,我实现了弹出一个kendo UI,谢谢。 – Rajni