Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • BasicForm
  • CalculatorWidget
  • DataRepeaterExample
  • ExampleCheckColumn1
  • ExampleCheckColumn2
  • ExampleSingleForm
  • NestedTabForm
  • PaginatorForm
  • ParamsForm
  • PersistentExampleForm
  • PersonEditPanel
  • PluginEditForm
  • PluginManagerForm
  • ProjectEditPanel
  • ProjectListForm
  • ProjectViewPanel
  • QAccordion
  • QActionControl
  • QAutocomplete
  • QBlockControl
  • QButton
  • QButtonBase
  • QCalendar
  • QCheckBox
  • QCheckBoxLegacyColumn
  • QCheckBoxList
  • QControl
  • QControlBase
  • QControlGrouping
  • QControlLabel
  • QCsvTextBox
  • QDataGrid
  • QDataGrid_CheckBoxColumn
  • QDataGrid_SortEvent
  • QDataGridBase
  • QDataGridLegacy
  • QDataGridLegacyBase
  • QDataGridLegacyColumn
  • QDataGridLegacyRow
  • QDataGridLegacyRowStyle
  • QDataRepeater
  • QDatepicker
  • QDatepickerBox
  • QDateTimePicker
  • QDateTimeTextBox
  • QDialog
  • QDialogBox
  • QDraggable
  • QDroppable
  • QDropZoneGrouping
  • QEmailTextBox
  • QFileAsset
  • QFileAssetBase
  • QFileAssetDialog
  • QFileControl
  • QFilterType
  • QFloatTextBox
  • QFontFamily
  • QForm
  • QFormBase
  • QHListItem
  • QHtmlAttributeManager
  • QHtmlAttributeManagerBase
  • QHtmlTable
  • QHtmlTableBase
  • QImageBase
  • QImageBrowser
  • QImageBrowserBase
  • QImageBrowserNav
  • QImageBrowserThumbnails
  • QImageButton
  • QImageControl
  • QImageControlBase
  • QImageFileAsset
  • QImageLabel
  • QImageLabelBase
  • QImageRollover
  • QIntegerTextBox
  • QJqButton
  • QJqCheckBox
  • QJqRadioButton
  • QJsTimer
  • QJsTimerBase
  • QLabel
  • QLinkButton
  • QListBox
  • QListBoxBase
  • QListControl
  • QListItem
  • QListItemBase
  • QListItemStyle
  • QNumericTextBox
  • QPaginatedControl
  • QPaginator
  • QPaginatorBase
  • QPanel
  • QProgressbar
  • QRadioButton
  • QRadioButtonList
  • QResizable
  • QSampleControl
  • QSelectable
  • QSlider
  • QSortable
  • QTabs
  • QTagStyler
  • QTestControl
  • QTextBox
  • QTimerExpiredEvent
  • QTreeNav
  • QTreeNavItem
  • QUrlTextBox
  • QWaitIcon
  • QWriteBox
  • RecordsSummary
  • RefreshForm
  • SampleForm
  • SelectableLabel
  • SpeedForm
  • TestImageBrowser
  • UrlForm

Traits

  • QListItemManager

Exceptions

  • QCrossScriptingException

Functions

  • __QForm_EvaluateTemplate_ObHandler
  • DataGridEvalHandleError
  • Overview
  • Package
  • Class

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
Extended by QHtmlAttributeManagerBase
Extended by QHtmlAttributeManager
Extended by QControlBase
Extended by QControl
Extended by QPaginatedControl uses QDataBinder
Extended by QHtmlTableBase
Extended by QHtmlTable
Extended by QDataGridBase

Direct known subclasses

QDataGrid
Package: Controls
Located at includes/base_controls/QDataGridBase.class.php
Methods summary
public
# __construct( QControl|QControlBase|QForm $objParentObject, string|null $strControlId = null )

QDataGridBase constructor.

QDataGridBase constructor.

Parameters

$objParentObject
$strControlId

Throws

Exception
QCallerException

Overrides

QHtmlTableBase::__construct()
protected string
# RenderCaption( )

An override to add the paginator to the caption area.

An override to add the paginator to the caption area.

Returns

string

Overrides

QHtmlTableBase::RenderCaption()
protected string
# RenderPaginator( )

Renders the given paginator in a span in the caption. If a caption already exists, it will add the caption.

Renders the given paginator in a span in the caption. If a caption already exists, it will add the caption.

Returns

string

Throws

QCallerException
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.

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, QAbstractHtmlTableColumn $objColumn )

An override to create an id for every column, since the id is what we use to track sorting.

An override to create an id for every column, since the id is what we use to track sorting.

Parameters

$intColumnIndex
$objColumn

Throws

QInvalidCastException

Overrides

QHtmlTableBase::AddColumnAt()
protected
# CheckClick( $strFormId, $strControlId, $strParameter )

Transfers clicks to any checkbox columns.

Transfers clicks to any checkbox columns.

Parameters

$strFormId
$strControlId
$strParameter
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.

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.

Parameters

$strColId
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.

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.

Parameters

$strColId

Returns

array|null
protected
# SortClick( string $strFormId, string $strControlId, mixed $mixParameter )

Processes clicks on a sortable column head.

Processes clicks on a sortable column head.

Parameters

$strFormId
$strControlId
$mixParameter

Throws

QCallerException
QInvalidCastException
protected string
# GetHeaderRowHtml( )

Override to return the header row to indicate when a column is sortable.

Override to return the header row to indicate when a column is sortable.

Returns

string

Overrides

QHtmlTableBase::GetHeaderRowHtml()
protected string
# GetHeaderCellContent( $objColumn )

Override to return sortable column info.

Override to return sortable column info.

Parameters

$objColumn

Returns

string
public string
# GetEndScript( )

Override to enable the datagrid2 javascript.

Override to enable the datagrid2 javascript.

Returns

string

Overrides

QControlBase::GetEndScript()
public mixed
# GetState( )

Returns the current state of the control to be able to restore it later.

Returns the current state of the control to be able to restore it later.

Returns

mixed

Overrides

QControlBase::GetState()
public
# PutState( mixed $state )

Restore the state of the control.

Restore the state of the control.

Parameters

$state
Previously saved state as returned by GetState above.

Overrides

QControlBase::PutState()
public static QDataGrid_CodeGenerator
# GetCodeGenerator( string $strClass = 'QDataGrid' )

Override to return the code generator for the list functionality.

Override to return the code generator for the list functionality.

Parameters

$strClass

Returns

QDataGrid_CodeGenerator
public boolean|integer
# GetSortColumnIndex( )

Returns the index of the currently sorted column. Returns false if nothing selected.

Returns the index of the currently sorted column. Returns false if nothing selected.

Returns

boolean|integer
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.

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.

This clause should not affect counting or limiting.

Returns

mixed
public boolean|integer|Keeps|mixed|null
# __get( string $strName )

Parameters

$strName

Returns

boolean|integer|Keeps|mixed|null

Throws

QCallerException

Overrides

QHtmlTableBase::__get()
public mixed|
# __set( string $strName, string $mixValue )

Parameters

$strName
$mixValue

Returns

mixed|

Throws

QCallerException
QInvalidCastException

Overrides

QHtmlTableBase::__set()
Methods inherited from QHtmlTableBase
AddColumn(), CreateCallableColumn(), CreateIndexedColumn(), CreateLinkColumn(), CreateNodeColumn(), CreatePropertyColumn(), CreateVirtualAttributeColumn(), GetAllColumns(), GetColumn(), GetColumnById(), GetColumnByName(), GetColumnIndex(), GetColumnTagsHtml(), GetColumnsByName(), GetControlHtml(), GetDataGridRowHtml(), GetFooterRowHtml(), GetHeaderRowParams(), GetModelConnectorParams(), GetRowClass(), GetRowId(), GetRowParams(), GetRowStyle(), HideAllColumns(), MoveColumn(), ParsePostData(), RemoveAllColumns(), RemoveColumn(), RemoveColumnById(), RemoveColumnByName(), RemoveColumns(), RemoveColumnsByName(), RenameColumn(), ShowAllColumns(), Sleep(), Wakeup()
Methods inherited from QPaginatedControl
DataBind(), Validate()
Methods inherited from QControlBase
AddAction(), AddActionArray(), AddAttributeScript(), AddChildControl(), AddCssFile(), AddJavascriptFile(), AddPluginCssFile(), AddPluginJavascriptFile(), AddWrapperCssClass(), Blink(), EvaluateTemplate(), Focus(), ForgetState(), GetAllActions(), GetAttributes(), GetChildControl(), GetChildControls(), GetControlFromHierarchyByMethodName(), GetCustomAttribute(), GetCustomAttributes(), GetCustomStyle(), GetEndHtml(), GetForm(), GetJavaScriptForEvent(), GetJqControlId(), GetNonWrappedHtml(), GetStyleAttributes(), GetTemplatePath(), GetWrapperAttributes(), GetWrapperStyleAttributes(), GetWrapperStyler(), IsDescendantOf(), IsModified(), MakeCurrent(), MarkAsModified(), MarkAsRendered(), MarkAsWrapperModified(), ProcessActionParameters(), Refresh(), RemoveAllActions(), RemoveChildControl(), RemoveChildControls(), RemoveCustomAttribute(), RemoveCustomStyle(), RemoveWrapperCssClass(), Render(), RenderActionScripts(), RenderAjax(), RenderAttributeScripts(), RenderChildren(), RenderComment(), RenderCssStyles(), RenderExtensionRenderer(), RenderHelper(), RenderHtmlAttributes(), RenderOutput(), RenderWithError(), RenderWithName(), RenderWrappedOutput(), ResetFlags(), ResetOnPageStatus(), SetCustomAttribute(), SetCustomStyle(), SetFocus(), SetForm(), SetParentControl(), SleepHelper(), ValidateControlAndChildren(), ValidationReset(), VarExport(), WakeupHelper(), Watch(), _CallActionMethod(), _ProcessActionParams(), _ReadState(), _WriteState()
Methods inherited from QHtmlAttributeManagerBase
AddCssClass(), GetCssStyle(), GetDataAttribute(), GetHtmlAttribute(), GetHtmlAttributes(), HasCssClass(), HasCssStyle(), HasHtmlAttribute(), Override(), RemoveCssClass(), RemoveCssClassesByPrefix(), RemoveCssStyle(), RemoveDataAttribute(), RemoveHtmlAttribute(), RenderTag(), SetCssBoxValue(), SetCssClass(), SetCssStyle(), SetDataAttribute(), SetHtmlAttribute()
Methods inherited from QBaseClass
OverrideAttributes(), __call()
Methods used from QDataBinder
CallDataBinder(), GetForm(), HasDataBinder(), SetDataBinder()
Constants summary
integer SortAscending

Numbers than can be used to multiply against the results of comparison functions to reverse the order.

Numbers than can be used to multiply against the results of comparison functions to reverse the order.

# 1
integer SortDescending
# -1
Constants inherited from QControlBase
CommentEnd, CommentStart
Properties summary
protected integer $intLastColumnId

Couter to generate column ids for columns that do not have them.

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.

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.

The direction of the currently sorted column.

# QDataGridBase::SortAscending
protected string $strCssClass

Default class

Default class

# 'datagrid'
Properties inherited from QHtmlTableBase
$blnHideIfEmpty, $blnRenderColumnTags, $blnShowFooter, $blnShowHeader, $intCurrentHeaderRowIndex, $intCurrentRowIndex, $intHeaderRowCount, $objColumnArray, $objRowParamsCallback, $strAlternateRowCssClass, $strCaption, $strHeaderRowCssClass, $strRowCssClass
Properties inherited from QPaginatedControl
$blnIsBlockElement, $blnUseAjax, $objDataSource, $objPaginator, $objPaginatorAlternate, $strNoun, $strNounPlural
Properties inherited from QControlBase
$blnActionsMustTerminate, $blnAutoRender, $blnDisplay, $blnMinimize, $blnModified, $blnOnPage, $blnRendered, $blnRendering, $blnRequired, $blnSaveState, $blnScriptsOnly, $blnUseWrapper, $blnVisible, $blnWrapLabel, $blnWrapperModified, $mixActionParameter, $mixCausesValidation, $objActionArray, $objChildControlArray, $objDraggable, $objDroppable, $objForm, $objLinkedNode, $objParentControl, $objResizable, $objWatcher, $objWrapperStyler, $strAttributeScripts, $strControlId, $strCustomAttributeArray, $strCustomStyleArray, $strFormAttributes, $strHtmlAfter, $strHtmlBefore, $strInstructions, $strJavaScripts, $strName, $strPreferredRenderMethod, $strRenderMethod, $strStyleSheets, $strValidationError, $strWarning
Properties inherited from QHtmlAttributeManagerBase
$attributes, $styles
Properties used from QDataBinder
$objDataBinder
Magic properties summary
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 QQClause $OrderByClause

The sorting clause based on the selected headers.

Magic properties inherited from QHtmlTableBase
$AlternateRowCssClass, $Caption, $CurrentRowIndex, $HeaderRowCssClass, $HideIfEmpty, $RenderColumnTags, $RowCssClass, $RowParamsCallback, $ShowFooter, $ShowHeader
Magic properties inherited from QPaginatedControl
$DataSource, $ItemCount, $ItemsOffset, $ItemsPerPage, $LimitClause, $LimitInfo, $Noun, $NounPlural, $PageCount, $PageNumber, $Paginator, $PaginatorAlternate, $TotalItemCount, $UseAjax
Magic properties inherited from QControlBase
$ActionParameter, $ActionsMustTerminate, $AutoRender, $CausesValidation, $ControlId, $Form, $FormAttributes, $HtmlAfter, $HtmlBefore, $Instructions, $JavaScripts, $LinkedNode, $Minimize, $Modified, $Moveable, $Name, $OnPage, $ParentControl, $PreferredRenderMethod, $RenderMethod, $Rendered, $Rendering, $Required, $Resizable, $SaveState, $ScriptsOnly, $StyleSheets, $UseWrapper, $ValidationError, $Visible, $Warning, $WrapLabel, $WrapperCssClass, $WrapperModified
Magic properties inherited from QHtmlAttributeManagerBase
$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
API documentation generated by ApiGen