diff options
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php index 753ec351..b8151d97 100644 --- a/framework/Web/UI/WebControls/TDataGrid.php +++ b/framework/Web/UI/WebControls/TDataGrid.php @@ -1060,8 +1060,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer $endPageIndex=$buttonCount;
if($pageIndex>$endPageIndex)
{
- //$startPageIndex=((int)($pageIndex/$maxButtonCount))*$maxButtonCount+1;
- $startPageIndex=$pageIndex;
+ $startPageIndex=((int)(($pageIndex-1)/$maxButtonCount))*$maxButtonCount+1;
if(($endPageIndex=$startPageIndex+$maxButtonCount-1)>$pageCount)
$endPageIndex=$pageCount;
if($endPageIndex-$startPageIndex+1<$maxButtonCount)
|