diff options
author | xue <> | 2006-02-05 06:35:32 +0000 |
---|---|---|
committer | xue <> | 2006-02-05 06:35:32 +0000 |
commit | 045b8b2a21873b8747fde66890b094f63c095c93 (patch) | |
tree | 58c4b4e7f4e146b96826f12d7e2b07dd7ef0b3fd /framework/Web | |
parent | ec7a31cfd6c72aa8ed055504b381edee6c547186 (diff) |
Added a demo of TDataGrid showing custom paging.
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGrid.php | 14 |
1 files changed, 7 insertions, 7 deletions
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 <b>PageCount</b> is calculated based the item number and the
* <b>PageSize</b> property. The datagrid will manage which section of the data source to be displayed
* based on the <b>CurrentPageIndex</b> property.
- * The second approach calculates the page number based on the <b>VirtualCount</b> property and
+ * The second approach calculates the page number based on the <b>VirtualItemCount</b> property and
* the <b>PageSize</b> property. The datagrid will always display from the beginning of the datasource
* upto the number of <b>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;
}
|