Class QDataGrid_CheckBoxColumn
A checkbox column that specifically is for inclusion in a QDataGrid object. The two work together to hand off important events and functionality.
The default functionality of this class shows the name of the column in the header, and uses the primary key of a database object as the checkbox id. It also stores the information on which boxes are checked in the session variable so that they can be easily recalled and do not clutter the form state. You can override additional functions below if you would like to store the checkbox state with the items themselves, or somewhere else.
If you turn on the CheckAll box in the header, you must subclass this column, and at a minimum implement the GetAllIds() function so that it knows the full set of ids to record as checked.
This column keeps track of what is checked and not checked in real time using ajax, rather than using POST methods. The primary reason is that what is visible in the table will generally not be the complete set of data available from the database if the datagrid is using a paginator.
- QBaseClass
- QAbstractHtmlTableColumn
- QAbstractHtmlTableDataColumn
- QHtmlTableCheckBoxColumn
- QDataGrid_CheckBoxColumn
public
array
|
#
GetCheckedItemIds( )
Return the array of item ids that are checked. Default stores the ids in the session. Override if you are storing them elsewhere. |
public
|
#
ClearCheckedItems( )
Clear all the checked items. Default stores the ids in the session. Override if you are storing them elsewhere. |
public
|
|
protected
null|string
|
#
GetCheckboxId( mixed|null $item )
Return the id attribute of the checkbox tag. Must be unique to the form. This will use the column id, which should be unique, and add the item id to the end to generate the object id. |
protected
string
|
#
GetCheckboxValue( mixed|null $item )
Return the value attribute of the checkbox tag. Values are required in html for checkboxes. |
protected
boolean
|
|
public
array
|
#
GetCheckboxParams( mixed|null $item )
Returns an array of parameters to attach to the checkbox tag. Includes whether the checkbox should appear as checked. Will try the callback first, and if not present, will try overridden functions. |
protected
boolean
|
#
GetItemCheckedState( $item )
Returns the checked state of the item. Default stores the ids in the session. Override if you are storing them elsewhere. |
protected
|
#
SetItemCheckedState( $itemId, $blnChecked )
Saves the checked state of the item to be recalled later. Default stores the ids in the session. Override if you are storing them elsewhere. |
protected
|
|
protected
array|null
|
|
protected
string
|
FetchCellObject(),
FetchHeaderCellValue(),
GetCheckboxName(),
SetCheckParamCallback(),
Sleep(),
Wakeup(),
__get(),
__set()
|
FetchCellValue()
|
OverrideAttributes(),
__call()
|
protected
boolean
|
$blnAllChecked
Record the state of the AllChecked checkbox in the header. |
|
protected
boolean
|
$blnShowCheckAll
|
#
false
|
$blnHtmlEntities,
$checkParamCallback
|
$objOrderByClause,
$objPostCallback,
$objReverseOrderByClause,
$strFormat,
$strPostMethod
|
$blnRenderAsHeader,
$blnVisible,
$cellParamsCallback,
$intSpan,
$objCellStyler,
$objColStyler,
$objHeaderCellStyler,
$objParentTable,
$strCssClass,
$strHeaderCssClass,
$strId,
$strName
|
$ShowCheckAll
|
$Format,
$OrderByClause,
$PostCallback,
$PostMethod,
$ReverseOrderByClause
|
$CellParamsCallback,
$CellStyler,
$ColStyler,
$CssClass,
$HeaderCellStyler,
$HeaderCssClass,
$HtmlEntities,
$Id,
$Name,
$ParentTable,
$RenderAsHeader,
$Span,
$Visible,
$_ParentTable
|