Class QHtmlTableBase
<
p>This control is used to display a simple html table.
The control itself will display things based off of an array of objects that gets set as the "Data Source". It is particularly useful when combined with the Class::LoadArrayByXXX() functions or the Class::LoadAll() that is generated by the CodeGen framework, or when combined with custom Class ArrayLoaders that you define youself, but who's structure is based off of the CodeGen framework.
For each item in a datasource's Array, a row (<tr>) will be generated. You can define any number of QHtmlTableColumns which will result in a <td> for each row. Using the QHtmlTableColumn's Accessor property, you can specify how the data for each cell should be fetched from the datasource.
- QBaseClass
- QHtmlAttributeManagerBase
- QHtmlAttributeManager
- QControlBase
- QControl
- QPaginatedControl uses QDataBinder
- QHtmlTableBase
Direct known subclasses
QHtmlTablePackage: Controls
Throws:
QCallerException
Located at includes/base_controls/QHtmlTableBase.class.php
public
|
#
__construct(
Constructor method |
public
|
|
public
|
#
CreateIndexedColumn( string $strName = '', mixed $mixIndex = null, integer $intColumnIndex = -1 )
Add an Index column and return it. Index columns assume that each data item is an array, and mixIndex is an offset in the array. |
public
|
#
CreatePropertyColumn( string $strName, string $strProperty, integer $intColumnIndex = -1, object $objBaseNode = null )
Add a property column and return it. The assumption is that each row's data is an object. |
public
|
|
public
|
#
CreateCallableColumn( string $strName, callable|array $objCallable, integer $intColumnIndex = -1 )
Add a callable column and return it. |
public
|
#
CreateVirtualAttributeColumn( $strName, $strAttribute, $intColumnIndex = -1 )
Add a virtual attribute column. |
public
|
#
CreateLinkColumn( string $strName, null|string|array $mixText, null|string|array|
Add a link column. |
public
|
#
MoveColumn( string $strName, integer $intColumnIndex = -1, string $strNewName = null )
Move the named column to the given position |
public
|
|
public
|
|
public
|
#
AddColumnAt( integer $intColumnIndex,
Add a column at the given position. All column adds bottle neck through here so that subclasses can reliably override the column add process if needed. Use AddColumn to add a column to the end. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
RemoveColumns( string[] $strNamesArray )
Remove all the columns that have any of the names in $strNamesArray |
public
|
|
public
|
#
HideAllColumns( )
Hide all columns without removing them from the grid. They will not display in the html, but they will still be part of the form state. |
public
|
|
public
|
|
public
|
|
public
|
#
GetColumnByName( string $strName )
Get the first column that has the given name, or null if a column with the given name does not exist |
public
null|
|
|
public
|
#
GetColumnIndex( string $strName )
Get the first column that has the given name, or null if a column with the given name does not exist |
public
|
|
protected
|
|
protected
array
|
#
GetHeaderRowParams( )
Returns a key=>val array of parameters to insert inside of the header row's < |
DataBind(),
Validate()
|
OverrideAttributes(),
__call()
|
CallDataBinder(),
GetForm(),
HasDataBinder(),
SetDataBinder()
|
CommentEnd,
CommentStart
|
protected
|
$objColumnArray
|
#
[]
|
protected
string|null
|
$strRowCssClass
CSS class to be applied to for even rows |
#
null
|
protected
string|null
|
$strAlternateRowCssClass
CSS class to be applied to for odd rows |
#
null
|
protected
string|null
|
$strHeaderRowCssClass
CSS class to be applied to the header row |
#
null
|
protected
boolean
|
$blnShowHeader
Show the table header or not? |
#
true
|
protected
boolean
|
$blnShowFooter
Show the table footer or not? |
#
false
|
protected
boolean
|
$blnRenderColumnTags
Column tags have to be rendered or not? |
#
false
|
protected
string|null
|
$strCaption
Table caption, if applicable |
#
null
|
protected
boolean
|
$blnHideIfEmpty
When set, the table is hidden/not rendered when the data source is empty |
#
false
|
protected
integer
|
$intHeaderRowCount
|
#
1
|
protected
integer
|
$intCurrentHeaderRowIndex
Used during rendering to report which header row is being drawn in a multi-row header. |
|
protected
integer
|
$intCurrentRowIndex
Used during rendering to report which visible row is being drawn. |
|
protected
callable
|
$objRowParamsCallback
|
$blnIsBlockElement,
$blnUseAjax,
$objDataSource,
$objPaginator,
$objPaginatorAlternate,
$strNoun,
$strNounPlural
|
$attributes,
$styles
|
$objDataBinder
|
public
string
|
$Caption
string to use as the caption of the table |
public
string
|
$RowCssClass
class to be given to the row tag |
public
string
|
$AlternateRowCssClass
class to be given to each alternate row tag |
public
string
|
$HeaderRowCssClass
class to be given the header row |
public
boolean
|
$ShowHeader
true to show the header row |
public
boolean
|
$ShowFooter
true to show the footer row |
public
boolean
|
$RenderColumnTags
true to include col tags in the table output |
public
boolean
|
$HideIfEmpty
true to completely hide the table if there is no data, vs. drawing the table with no rows. |
public read-only
integer
|
$CurrentRowIndex
The visual index of the row currently being drawn. |
public write-only
Callable
|
$RowParamsCallback
Set to a callback function to fetch custom attributes for row tags. |
$DataSource,
$ItemCount,
$ItemsOffset,
$ItemsPerPage,
$LimitClause,
$LimitInfo,
$Noun,
$NounPlural,
$PageCount,
$PageNumber,
$Paginator,
$PaginatorAlternate,
$TotalItemCount,
$UseAjax
|
$AccessKey,
$AltText,
$BackColor,
$BorderCollapse,
$BorderColor,
$BorderStyle,
$BorderWidth,
$CssClass,
$Cursor,
$Data,
$Display,
$DisplayStyle,
$Enabled,
$FontBold,
$FontItalic,
$FontNames,
$FontOverline,
$FontSize,
$FontStrikeout,
$FontUnderline,
$ForeColor,
$Height,
$HorizontalAlign,
$Left,
$Margin,
$NoWrap,
$Opacity,
$OrderedListType,
$Overflow,
$Padding,
$Position,
$ReadOnly,
$TabIndex,
$ToolTip,
$Top,
$UnorderedListStyle,
$VerticalAlign,
$Width
|