Class QDataGridBase
Class QDataGridBase
This class is designed primarily to work alongside the code generator, but it can be independent as well. It creates an html table that displays data from the database. The data can possibly be sorted by clicking on the header cell of the sort column.
This grid also has close ties to the QDataGrid_CheckboxColumn to easily enable the addition of a column or columns of checkboxes.
This class is NOT intended to support column filters, but a subclass could be created that could do so. Just don't do that here.
- QBaseClass
- QHtmlAttributeManagerBase
- QHtmlAttributeManager
- QControlBase
- QControl
- QPaginatedControl uses QDataBinder
- QHtmlTableBase
- QHtmlTable
- QDataGridBase
Direct known subclasses
QDataGrid
public
|
#
__construct(
QDataGridBase constructor. |
protected
string
|
|
protected
string
|
#
RenderPaginator( )
Renders the given paginator in a span in the caption. If a caption already exists, it will add the caption. |
public
|
#
AddActions( )
Adds the actions for the table. Override to add additional actions. If you are detecting clicks that need to cancel the default action, put those in front of this function. |
public
|
#
AddColumnAt( integer $intColumnIndex,
An override to create an id for every column, since the id is what we use to track sorting. |
protected
|
|
public
|
#
ClearCheckedItems( string|null $strColId = null )
Clears all checkboxes in checkbox columns. If you have multiple checkbox columns, you can specify which column to clear. Otherwise, it will clear all of them. |
public
array|null
|
#
GetCheckedItemIds( mixed $strColId = null )
Returns the checked item ids if the data grid has a QDataGrid_CheckboxColumn column. If there is more than one column, you can specify which column to want to query. If no id is specified, it will return the ids from the first column found. If no column was found, then null is returned. |
protected
|
|
protected
string
|
|
protected
string
|
|
public
string
|
|
public
mixed
|
|
public
|
|
public static
|
#
GetCodeGenerator( string $strClass = 'QDataGrid' )
Override to return the code generator for the list functionality. |
public
boolean|integer
|
#
GetSortColumnIndex( )
Returns the index of the currently sorted column. Returns false if nothing selected. |
public
mixed
|
#
GetOrderByInfo( )
Return information on sorting the data. For SQL databases, this would be a QQClause. But since this just gets the clause from the currently active column, it could be anything. |
public
boolean|integer|Keeps|mixed|null
|
|
public
mixed|
|
DataBind(),
Validate()
|
OverrideAttributes(),
__call()
|
CallDataBinder(),
GetForm(),
HasDataBinder(),
SetDataBinder()
|
integer |
SortAscending
Numbers than can be used to multiply against the results of comparison functions to reverse the order. |
#
1
|
integer |
SortDescending
|
#
-1
|
CommentEnd,
CommentStart
|
protected
integer
|
$intLastColumnId
Couter to generate column ids for columns that do not have them. |
#
0
|
protected
string
|
$strSortColumnId
Keeps track of current sort column. We do it by id so that the table can add/hide/show or rearrange columns and maintain the sort column. |
|
protected
integer
|
$intSortDirection
The direction of the currently sorted column. |
|
protected
string
|
$strCssClass
Default class |
#
'datagrid'
|
$blnIsBlockElement,
$blnUseAjax,
$objDataSource,
$objPaginator,
$objPaginatorAlternate,
$strNoun,
$strNounPlural
|
$attributes,
$styles
|
$objDataBinder
|
public
string
|
$SortColumnId
The id of the currently sorted column. Does not change if columns are re-ordered. |
public
integer
|
$SortColumnIndex
The index of the currently sorted column. |
public
integer
|
$SortDirection
SortAscending or SortDescending. |
public read-only
|
$OrderByClause
The sorting clause based on the selected headers. |
$AlternateRowCssClass,
$Caption,
$CurrentRowIndex,
$HeaderRowCssClass,
$HideIfEmpty,
$RenderColumnTags,
$RowCssClass,
$RowParamsCallback,
$ShowFooter,
$ShowHeader
|
$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
|