| [ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
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> |
| Copyright: | Copyright © 2005 PradoSoft |
| License: | http://www.pradosoft.com/license/ |
| Version: | $Id: TDataGrid.php 1520 2006-11-27 03:17:58Z xue $ |
| Poids: | 2276 lignes (66 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
TDataGrid:: (69 méthodes):
getTagName()
addParsedObject()
getColumns()
getAutoColumns()
getItems()
getItemCount()
createStyle()
getBackImageUrl()
setBackImageUrl()
getItemStyle()
getAlternatingItemStyle()
getSelectedItemStyle()
getEditItemStyle()
getHeaderStyle()
getFooterStyle()
getPagerStyle()
getCaption()
setCaption()
getCaptionAlign()
setCaptionAlign()
getHeader()
getFooter()
getTopPager()
getBottomPager()
getSelectedItem()
getSelectedItemIndex()
setSelectedItemIndex()
getEditItem()
getEditItemIndex()
setEditItemIndex()
getAllowSorting()
setAllowSorting()
getAutoGenerateColumns()
setAutoGenerateColumns()
getShowHeader()
setShowHeader()
getShowFooter()
setShowFooter()
getEmptyTemplate()
setEmptyTemplate()
bubbleEvent()
onCancelCommand()
onDeleteCommand()
onEditCommand()
onItemCommand()
onSortCommand()
onUpdateCommand()
onItemCreated()
onPagerCreated()
onItemDataBound()
onPageIndexChanged()
saveState()
loadState()
reset()
restoreGridFromViewState()
performDataBinding()
createItem()
createItemInternal()
initializeItem()
createPager()
buildPager()
createPagerButton()
buildNextPrevPager()
buildNumericPager()
createAutoColumns()
applyItemStyles()
renderBeginTag()
render()
renderTable()
TDataGridItemEventParameter:: (2 méthodes):
__construct()
getItem()
TDataGridPagerEventParameter:: (2 méthodes):
__construct()
getPager()
TDataGridCommandEventParameter:: (3 méthodes):
__construct()
getItem()
getCommandSource()
TDataGridSortCommandEventParameter:: (3 méthodes):
__construct()
getCommandSource()
getSortExpression()
TDataGridPageChangedEventParameter:: (3 méthodes):
__construct()
getCommandSource()
getNewPageIndex()
TDataGridItem:: (8 méthodes):
__construct()
getItemType()
setItemType()
getItemIndex()
getDataSourceIndex()
getDataItem()
setDataItem()
bubbleEvent()
TDataGridPager:: (4 méthodes):
__construct()
bubbleEvent()
getDataGrid()
getItemType()
TDataGridItemCollection:: (1 méthode):
insertAt()
TDataGridColumnCollection:: (3 méthodes):
__construct()
getOwner()
insertAt()
TDataGridPagerStyle:: (17 méthodes):
getMode()
setMode()
getButtonType()
setButtonType()
getNextPageText()
setNextPageText()
getPrevPageText()
setPrevPageText()
getPageButtonCount()
setPageButtonCount()
getPosition()
setPosition()
getVisible()
setVisible()
reset()
copyFrom()
mergeWith()
TDataGridPagerMode:: (0 méthodes):
TDataGridPagerButtonType:: (0 méthodes):
TDataGridPagerPosition:: (0 méthodes):
| getTagName() X-Ref |
return: string tag name (table) of the datagrid |
| addParsedObject($object) X-Ref |
| Adds objects parsed in template to datagrid. Datagrid columns are added into {@link getColumns Columns} collection. param: mixed object parsed in template |
| getColumns() X-Ref |
return: TDataGridColumnCollection manually specified datagrid columns |
| getAutoColumns() X-Ref |
return: TDataGridColumnCollection automatically generated datagrid columns |
| getItems() X-Ref |
return: TDataGridItemCollection datagrid item collection |
| getItemCount() X-Ref |
return: integer number of items |
| createStyle() X-Ref |
| Creates a style object for the control. This method creates a {@link TTableStyle} to be used by datagrid. return: TTableStyle control style to be used |
| getBackImageUrl() X-Ref |
return: string the URL of the background image for the datagrid |
| setBackImageUrl($value) X-Ref |
param: string the URL of the background image for the datagrid |
| getItemStyle() X-Ref |
return: TTableItemStyle the style for every item |
| getAlternatingItemStyle() X-Ref |
return: TTableItemStyle the style for each alternating item |
| getSelectedItemStyle() X-Ref |
return: TTableItemStyle the style for selected item |
| getEditItemStyle() X-Ref |
return: TTableItemStyle the style for edit item |
| getHeaderStyle() X-Ref |
return: TTableItemStyle the style for header |
| getFooterStyle() X-Ref |
return: TTableItemStyle the style for footer |
| getPagerStyle() X-Ref |
return: TDataGridPagerStyle the style for pager |
| getCaption() X-Ref |
return: string caption for the datagrid |
| setCaption($value) X-Ref |
param: string caption for the datagrid |
| getCaptionAlign() X-Ref |
return: TTableCaptionAlign datagrid caption alignment. Defaults to TTableCaptionAlign::NotSet. |
| setCaptionAlign($value) X-Ref |
param: TTableCaptionAlign datagrid caption alignment. Valid values include |
| getHeader() X-Ref |
return: TDataGridItem the header item |
| getFooter() X-Ref |
return: TDataGridItem the footer item |
| getTopPager() X-Ref |
return: TDataGridPager the pager displayed at the top of datagrid. It could be null if paging is disabled. |
| getBottomPager() X-Ref |
return: TDataGridPager the pager displayed at the bottom of datagrid. It could be null if paging is disabled. |
| getSelectedItem() X-Ref |
return: TDataGridItem the selected item, null if no item is selected. |
| getSelectedItemIndex() X-Ref |
return: integer the zero-based index of the selected item in {@link getItems Items}. |
| setSelectedItemIndex($value) X-Ref |
| Selects an item by its index in {@link getItems Items}. Previously selected item will be un-selected. If the item to be selected is already in edit mode, it will remain in edit mode. If the index is less than 0, any existing selection will be cleared up. param: integer the selected item index |
| getEditItem() X-Ref |
return: TDataGridItem the edit item |
| getEditItemIndex() X-Ref |
return: integer the zero-based index of the edit item in {@link getItems Items}. |
| setEditItemIndex($value) X-Ref |
| Edits an item by its index in {@link getItems Items}. Previously editting item will change to normal item state. If the index is less than 0, any existing edit item will be cleared up. param: integer the edit item index |
| getAllowSorting() X-Ref |
return: boolean whether sorting is enabled. Defaults to false. |
| setAllowSorting($value) X-Ref |
param: boolean whether sorting is enabled |
| getAutoGenerateColumns() X-Ref |
return: boolean whether datagrid columns should be automatically generated. Defaults to true. |
| setAutoGenerateColumns($value) X-Ref |
param: boolean whether datagrid columns should be automatically generated |
| getShowHeader() X-Ref |
return: boolean whether the header should be displayed. Defaults to true. |
| setShowHeader($value) X-Ref |
param: boolean whether the header should be displayed |
| getShowFooter() X-Ref |
return: boolean whether the footer should be displayed. Defaults to false. |
| setShowFooter($value) X-Ref |
param: boolean whether the footer should be displayed |
| getEmptyTemplate() X-Ref |
return: ITemplate the template applied when no data is bound to the datagrid |
| setEmptyTemplate($value) X-Ref |
param: ITemplate the template applied when no data is bound to the datagrid |
| bubbleEvent($sender,$param) X-Ref |
| This method overrides parent's implementation to handle {@link onItemCommand OnItemCommand} event which is bubbled from {@link TDataGridItem} child controls. If the event parameter is {@link TDataGridCommandEventParameter} and the command name is a recognized one, which includes 'select', 'edit', 'delete', 'update', and 'cancel' (case-insensitive), then a corresponding command event is also raised (such as {@link onEditCommand OnEditCommand}). This method should only be used by control developers. param: TControl the sender of the event param: TEventParameter event parameter return: boolean whether the event bubbling should stop here. |
| onCancelCommand($param) X-Ref |
| Raises <b>OnCancelCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event with <b>cancel</b> command name. param: TDataGridCommandEventParameter event parameter |
| onDeleteCommand($param) X-Ref |
| Raises <b>OnDeleteCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event with <b>delete</b> command name. param: TDataGridCommandEventParameter event parameter |
| onEditCommand($param) X-Ref |
| Raises <b>OnEditCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event with <b>edit</b> command name. param: TDataGridCommandEventParameter event parameter |
| onItemCommand($param) X-Ref |
| Raises <b>OnItemCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event. param: TDataGridCommandEventParameter event parameter |
| onSortCommand($param) X-Ref |
| Raises <b>OnSortCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event with <b>sort</b> command name. param: TDataGridSortCommandEventParameter event parameter |
| onUpdateCommand($param) X-Ref |
| Raises <b>OnUpdateCommand</b> event. This method is invoked when a button control raises <b>OnCommand</b> event with <b>update</b> command name. param: TDataGridCommandEventParameter event parameter |
| onItemCreated($param) X-Ref |
| Raises <b>OnItemCreated</b> event. This method is invoked right after a datagrid item is created and before added to page hierarchy. param: TDataGridItemEventParameter event parameter |
| onPagerCreated($param) X-Ref |
| Raises <b>OnPagerCreated</b> event. This method is invoked right after a datagrid pager is created and before added to page hierarchy. param: TDataGridPagerEventParameter event parameter |
| onItemDataBound($param) X-Ref |
| Raises <b>OnItemDataBound</b> event. This method is invoked for each datagrid item after it performs databinding. param: TDataGridItemEventParameter event parameter |
| onPageIndexChanged($param) X-Ref |
| Raises <b>OnPageIndexChanged</b> event. This method is invoked when current page is changed. param: TDataGridPageChangedEventParameter event parameter |
| saveState() X-Ref |
| Saves item count in viewstate. This method is invoked right before control state is to be saved. |
| loadState() X-Ref |
| Loads item count information from viewstate. This method is invoked right after control state is loaded. |
| reset() X-Ref |
| Clears up all items in the datagrid. |
| restoreGridFromViewState() X-Ref |
| Restores datagrid content from viewstate. |
| performDataBinding($data) X-Ref |
| Performs databinding to populate datagrid items from data source. This method is invoked by {@link dataBind()}. You may override this function to provide your own way of data population. param: Traversable the bound data |
| createItem($itemIndex,$dataSourceIndex,$itemType) X-Ref |
| Creates a datagrid item instance based on the item type and index. param: integer zero-based item index param: TListItemType item type return: TDataGridItem created data list item |
| createItemInternal($itemIndex,$dataSourceIndex,$itemType,$dataBind,$dataItem,$columns) X-Ref |
| Pas de description |
| initializeItem($item,$columns) X-Ref |
| Initializes a datagrid item and cells inside it param: TDataGrid datagrid item to be initialized param: TDataGridColumnCollection datagrid columns to be used to initialize the cells in the item |
| createPager() X-Ref |
| Pas de description |
| buildPager($pager) X-Ref |
| Builds the pager content based on pager style. param: TDataGridPager the container for the pager |
| createPagerButton($buttonType,$enabled,$text,$commandName,$commandParameter) X-Ref |
| Creates a pager button. Depending on the button type, a TLinkButton or a TButton may be created. If it is enabled (clickable), its command name and parameter will also be set. Derived classes may override this method to create additional types of buttons, such as TImageButton. param: string button type, either LinkButton or PushButton param: boolean whether the button should be enabled param: string caption of the button param: string CommandName corresponding to the OnCommand event of the button param: string CommandParameter corresponding to the OnCommand event of the button return: mixed the button instance |
| buildNextPrevPager($pager) X-Ref |
| Builds a next-prev pager param: TDataGridPager the container for the pager |
| buildNumericPager($pager) X-Ref |
| Builds a numeric pager param: TDataGridPager the container for the pager |
| createAutoColumns($dataSource) X-Ref |
| Automatically generates datagrid columns based on datasource schema param: Traversable data source bound to the datagrid return: TDataGridColumnCollection |
| applyItemStyles() X-Ref |
| Applies styles to items, header, footer and separators. Item styles are applied in a hierarchical way. Style in higher hierarchy will inherit from styles in lower hierarchy. Starting from the lowest hierarchy, the item styles include item's own style, {@link getItemStyle ItemStyle}, {@link getAlternatingItemStyle AlternatingItemStyle}, {@link getSelectedItemStyle SelectedItemStyle}, and {@link getEditItemStyle EditItemStyle}. Therefore, if background color is set as red in {@link getItemStyle ItemStyle}, {@link getEditItemStyle EditItemStyle} will also have red background color unless it is set to a different value explicitly. |
| renderBeginTag($writer) X-Ref |
| Renders the openning tag for the datagrid control which will render table caption if present. param: THtmlWriter the writer used for the rendering purpose |
| render($writer) X-Ref |
| Renders the datagrid. param: THtmlWriter writer for the rendering purpose |
| renderTable($writer) X-Ref |
| Renders the tabular data. param: THtmlWriter writer |
Classe: TDataGridItemEventParameter - X-Ref
TDataGridItemEventParameter class| __construct(TDataGridItem $item) X-Ref |
| Constructor. param: TDataGridItem datagrid item related with the corresponding event |
| getItem() X-Ref |
return: TDataGridItem datagrid item related with the corresponding event |
Classe: TDataGridPagerEventParameter - X-Ref
TDataGridPagerEventParameter class| __construct(TDataGridPager $pager) X-Ref |
| Constructor. param: TDataGridPager datagrid pager related with the corresponding event |
| getPager() X-Ref |
return: TDataGridPager datagrid pager related with the corresponding event |
Classe: TDataGridCommandEventParameter - X-Ref
TDataGridCommandEventParameter class| __construct($item,$source,TCommandEventParameter $param) X-Ref |
| Constructor. param: TDataGridItem datagrid item responsible for the event param: TControl original event sender param: TCommandEventParameter original event parameter |
| getItem() X-Ref |
return: TDataGridItem the TDataGridItem control responsible for the event. |
| getCommandSource() X-Ref |
return: TControl the control originally raises the <b>Command</b> event. |
Classe: TDataGridSortCommandEventParameter - X-Ref
TDataGridSortCommandEventParameter class| __construct($source,TDataGridCommandEventParameter $param) X-Ref |
| Constructor. param: TControl the control originally raises the <b>OnCommand</b> event. param: TDataGridCommandEventParameter command event parameter |
| getCommandSource() X-Ref |
return: TControl the control originally raises the <b>OnCommand</b> event. |
| getSortExpression() X-Ref |
return: string sort expression |
Classe: TDataGridPageChangedEventParameter - X-Ref
TDataGridPageChangedEventParameter class| __construct($source,$newPageIndex) X-Ref |
| Constructor. param: TControl the control originally raises the <b>OnCommand</b> event. param: integer new page index |
| getCommandSource() X-Ref |
return: TControl the control originally raises the <b>OnCommand</b> event. |
| getNewPageIndex() X-Ref |
return: integer new page index |
Classe: TDataGridItem - X-Ref
TDataGridItem class| __construct($itemIndex,$dataSourceIndex,$itemType) X-Ref |
| Constructor. param: integer zero-based index of the item in the item collection of datagrid param: TListItemType item type |
| getItemType() X-Ref |
return: TListItemType item type. |
| setItemType($value) X-Ref |
param: TListItemType item type |
| getItemIndex() X-Ref |
return: integer zero-based index of the item in the item collection of datagrid |
| getDataSourceIndex() X-Ref |
return: integer the index of the datagrid item from the bound data source |
| getDataItem() X-Ref |
return: mixed data associated with the item |
| setDataItem($value) X-Ref |
param: mixed data to be associated with the item |
| bubbleEvent($sender,$param) X-Ref |
| This method overrides parent's implementation by wrapping event parameter for <b>OnCommand</b> event with item information. param: TControl the sender of the event param: TEventParameter event parameter return: boolean whether the event bubbling should stop here. |
Classe: TDataGridPager - X-Ref
TDataGridPager class.| __construct($dataGrid) X-Ref |
| Constructor. param: TDataGrid datagrid object |
| bubbleEvent($sender,$param) X-Ref |
| This method overrides parent's implementation by wrapping event parameter for <b>OnCommand</b> event with item information. param: TControl the sender of the event param: TEventParameter event parameter return: boolean whether the event bubbling should stop here. |
| getDataGrid() X-Ref |
return: TDataGrid the datagrid owning this pager |
| getItemType() X-Ref |
return: string item type. |
Classe: TDataGridItemCollection - X-Ref
TDataGridItemCollection class.Classe: TDataGridColumnCollection - X-Ref
TDataGridColumnCollection class.| __construct(TDataGrid $owner) X-Ref |
| Constructor. param: TDataGrid the control that owns this collection. |
| getOwner() X-Ref |
return: TDataGrid the control that owns this collection. |
| insertAt($index,$item) X-Ref |
| Inserts an item at the specified position. This overrides the parent implementation by inserting only TDataGridColumn. param: integer the speicified position. param: mixed new item |
Classe: TDataGridPagerStyle - X-Ref
TDataGridPagerStyle class.| getMode() X-Ref |
return: TDataGridPagerMode pager mode. Defaults to TDataGridPagerMode::NextPrev. |
| setMode($value) X-Ref |
param: TDataGridPagerMode pager mode. |
| getButtonType() X-Ref |
return: TDataGridPagerButtonType the type of command button. Defaults to TDataGridPagerButtonType::LinkButton. |
| setButtonType($value) X-Ref |
param: TDataGridPagerButtonType the type of command button |
| getNextPageText() X-Ref |
return: string text for the next page button. Defaults to '>'. |
| setNextPageText($value) X-Ref |
param: string text for the next page button. |
| getPrevPageText() X-Ref |
return: string text for the previous page button. Defaults to '<'. |
| setPrevPageText($value) X-Ref |
param: string text for the next page button. |
| getPageButtonCount() X-Ref |
return: integer maximum number of pager buttons to be displayed. Defaults to 10. |
| setPageButtonCount($value) X-Ref |
param: integer maximum number of pager buttons to be displayed |
| getPosition() X-Ref |
return: TDataGridPagerPosition where the pager is to be displayed. Defaults to TDataGridPagerPosition::Bottom. |
| setPosition($value) X-Ref |
param: TDataGridPagerPosition where the pager is to be displayed. |
| getVisible() X-Ref |
return: boolean whether the pager is visible. Defaults to true. |
| setVisible($value) X-Ref |
param: boolean whether the pager is visible. |
| reset() X-Ref |
| Resets the style to the original empty state. |
| copyFrom($style) X-Ref |
| Copies the fields in a new style to this style. If a style field is set in the new style, the corresponding field in this style will be overwritten. param: TStyle the new style |
| mergeWith($style) X-Ref |
| Merges the style with a new one. If a style field is not set in this style, it will be overwritten by the new one. param: TStyle the new style |
Classe: TDataGridPagerMode - X-Ref
TDataGridPagerMode class.Classe: TDataGridPagerButtonType - X-Ref
TDataGridPagerButtonType class.Classe: TDataGridPagerPosition - X-Ref
TDataGridPagerPosition class.| Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |