diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php')
-rw-r--r-- | framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php b/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php new file mode 100644 index 00000000..f02f7d49 --- /dev/null +++ b/framework/Web/UI/WebControls/TDataGridPageChangedEventParameter.php @@ -0,0 +1,68 @@ +<?php +/** + * TDataGrid related class files. + * This file contains the definition of the following classes: + * TDataGrid, TDataGridItem, TDataGridItemCollection, TDataGridColumnCollection, + * TDataGridPagerStyle, TDataGridItemEventParameter, + * TDataGridCommandEventParameter, TDataGridSortCommandEventParameter, + * TDataGridPageChangedEventParameter + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @link http://www.pradosoft.com/ + * @copyright Copyright © 2005-2014 PradoSoft + * @license http://www.pradosoft.com/license/ + * @package System.Web.UI.WebControls + */ + +/** + * TDataGridPageChangedEventParameter class + * + * TDataGridPageChangedEventParameter encapsulates the parameter data for + * {@link TDataGrid::onPageIndexChanged PageIndexChanged} event of {@link TDataGrid} controls. + * + * The {@link getCommandSource CommandSource} property refers to the control + * that originally raises the OnCommand event, while {@link getNewPageIndex NewPageIndex} + * returns the new page index carried with the page command. + * + * @author Qiang Xue <qiang.xue@gmail.com> + * @package System.Web.UI.WebControls + * @since 3.0 + */ +class TDataGridPageChangedEventParameter extends TEventParameter +{ + /** + * @var integer new page index + */ + private $_newIndex; + /** + * @var TControl original event sender + */ + private $_source=null; + + /** + * Constructor. + * @param TControl the control originally raises the <b>OnCommand</b> event. + * @param integer new page index + */ + public function __construct($source,$newPageIndex) + { + $this->_source=$source; + $this->_newIndex=$newPageIndex; + } + + /** + * @return TControl the control originally raises the <b>OnCommand</b> event. + */ + public function getCommandSource() + { + return $this->_source; + } + + /** + * @return integer new page index + */ + public function getNewPageIndex() + { + return $this->_newIndex; + } +}
\ No newline at end of file |