From 4aed8371a7ddf4ac9e4eec4ae8ed3ebe039ba976 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 1 Dec 2006 12:37:06 +0000 Subject: fixed current page index. --- framework/Web/UI/WebControls/TDataBoundControl.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'framework/Web/UI/WebControls') diff --git a/framework/Web/UI/WebControls/TDataBoundControl.php b/framework/Web/UI/WebControls/TDataBoundControl.php index 79175288..6e1d1003 100644 --- a/framework/Web/UI/WebControls/TDataBoundControl.php +++ b/framework/Web/UI/WebControls/TDataBoundControl.php @@ -337,7 +337,10 @@ abstract class TDataBoundControl extends TWebControl $ds->setDataSource($data); $this->setViewState('PageCount',$ds->getPageCount()); if($ds->getCurrentPageIndex()>=$ds->getPageCount()) + { $ds->setCurrentPageIndex($ds->getPageCount()-1); + $this->setCurrentPageIndex($ds->getCurrentPageIndex()); + } $this->performDataBinding($ds); } else -- cgit v1.2.3