From 045b8b2a21873b8747fde66890b094f63c095c93 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Sun, 5 Feb 2006 06:35:32 +0000
Subject: Added a demo of TDataGrid showing custom paging.
---
framework/Web/UI/WebControls/TDataGrid.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'framework/Web/UI/WebControls')
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index b0dafb5d..57d00ac8 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -79,7 +79,7 @@ Prado::using('System.Web.UI.WebControls.TTable');
* datasource. The number of pages PageCount is calculated based the item number and the
* PageSize property. The datagrid will manage which section of the data source to be displayed
* based on the CurrentPageIndex property.
- * The second approach calculates the page number based on the VirtualCount property and
+ * The second approach calculates the page number based on the VirtualItemCount property and
* the PageSize property. The datagrid will always display from the beginning of the datasource
* upto the number of PageSize> data items. This approach is especially useful when the datasource may
* contain too many data items to be managed by the datagrid efficiently.
@@ -504,19 +504,19 @@ class TDataGrid extends TBaseDataList implements INamingContainer
/**
* @return integer virtual number of items in the grid. Defaults to 0, meaning not set.
*/
- public function getVirtualCount()
+ public function getVirtualItemCount()
{
- return $this->getViewState('VirtualCount',0);
+ return $this->getViewState('VirtualItemCount',0);
}
/**
* @param integer virtual number of items in the grid
*/
- public function setVirtualCount($value)
+ public function setVirtualItemCount($value)
{
if(($value=TPropertyValue::ensureInteger($value))<0)
- throw new TInvalidDataValueException('datagrid_virtualcount_invalid');
- $this->setViewState('VirtualCount',$value,0);
+ throw new TInvalidDataValueException('datagrid_virtualitemcount_invalid');
+ $this->setViewState('VirtualItemCount',$value,0);
}
/**
@@ -794,7 +794,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer
$ds->setPageSize($this->getPageSize());
$ds->setAllowPaging($this->getAllowPaging());
$ds->setAllowCustomPaging($this->getAllowCustomPaging());
- $ds->setVirtualCount($this->getVirtualCount());
+ $ds->setVirtualItemCount($this->getVirtualItemCount());
return $ds;
}
--
cgit v1.2.3