Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml


Classes:
IDataSource
IItemDataRenderer
IRepeatInfoUser
TActiveFileUpload
TBaseDataList
TBaseValidator
TBoundColumn
TBulletedList
TBulletedListDisplayMode
TBulletedListEventParameter
TBulletStyle
TButton
TButtonColumn
TButtonColumnType
TButtonType
TCaptcha
TCaptchaValidator
TCheckBox
TCheckBoxColumn
TCheckBoxList
TCircleHotSpot
TClientScript
TClientScriptLoader
TClientSideValidationSummaryOptions
TColorPicker
TColorPickerClientSide
TColorPickerMode
TCompareValidator
TCompleteWizardStep
TConditional
TContent
TContentDirection
TContentPlaceHolder
TCustomValidator
TDataBoundControl
TDataGrid
TDataGridColumn
TDataGridColumnCollection
TDataGridCommandEventParameter
TDataGridItem
TDataGridItemCollection
TDataGridItemEventParameter
TDataGridItemRenderer
TDataGridPageChangedEventParameter
TDataGridPager
TDataGridPagerButtonType
TDataGridPagerEventParameter
TDataGridPagerMode
TDataGridPagerPosition
TDataGridPagerStyle
TDataGridSortCommandEventParameter
TDataList
TDataListCommandEventParameter
TDataListItem
TDataListItemCollection
TDataListItemEventParameter
TDataListItemRenderer
TDataRenderer
TDataSourceControl
TDataSourceSelectParameters
TDataSourceView
TDataTypeValidator
TDatePicker
TDatePickerClientScript
TDatePickerInputMode
TDatePickerMode
TDatePickerPositionMode
TDisplayStyle
TDraggable
TDropContainer
TDropDownList
TDropDownListColumn
TEditCommandColumn
TEmailAddressValidator
TExpression
TFileUpload
TFont
THiddenField
THorizontalAlign
THotSpot
THotSpotCollection
THotSpotMode
THtmlArea
THtmlElement
THyperLink
THyperLinkColumn
TImage
TImageButton
TImageClickEventParameter
TImageMap
TImageMapEventParameter
TInlineFrame
TInlineFrameAlign
TInlineFrameScrollBars
TItemDataRenderer
TJavascriptLogger
TKeyboard
TLabel
TLinkButton
TListBox
TListControl
TListControlValidator
TListItem
TListItemCollection
TListItemType
TListSelectionMode
TLiteral
TLiteralColumn
TMarkdown
TMetaTag
TMetaTagCollection
TMultiView
TOutputCache
TOutputCacheCalculateKeyEventParameter
TOutputCacheCheckDependencyEventParameter
TPager
TPagerButtonType
TPagerMode
TPagerPageChangedEventParameter
TPanel
TPanelStyle
TPlaceHolder
TPolygonHotSpot
TRadioButton
TRadioButtonList
TRangeValidationDataType
TRangeValidator
TRatingList
TReadOnlyDataSource
TReadOnlyDataSourceView
TRectangleHotSpot
TRegularExpressionValidator
TRepeatDirection
TRepeater
TRepeaterCommandEventParameter
TRepeaterItem
TRepeaterItemCollection
TRepeaterItemEventParameter
TRepeaterItemRenderer
TRepeatInfo
TRepeatLayout
TRequiredFieldValidator
TSafeHtml
TScrollBars
TServerValidateEventParameter
TSlider
TSliderClientScript
TSliderDirection
TStatements
TStyle
TStyleSheet
TTable
TTableCaptionAlign
TTableCell
TTableCellCollection
TTableFooterRow
TTableGridLines
TTableHeaderCell
TTableHeaderRow
TTableHeaderScope
TTableItemStyle
TTableRow
TTableRowCollection
TTableRowSection
TTableStyle
TTabPanel
TTabView
TTabViewCollection
TTemplateColumn
TTemplatedWizardStep
TTextAlign
TTextBox
TTextBoxAutoCompleteType
TTextBoxMode
TTextHighlighter
TTextHighlighterLineNumberStyle
TValidationCompareOperator
TValidationDataType
TValidationSummary
TValidationSummaryDisplayMode
TValidationSummaryDisplayStyle
TValidatorClientSide
TValidatorDisplayStyle
TVerticalAlign
TView
TViewCollection
TWebControl
TWebControlAdapter
TWizard
TWizardFinishNavigationTemplate
TWizardNavigationButtonStyle
TWizardNavigationButtonType
TWizardNavigationContainer
TWizardNavigationEventParameter
TWizardNavigationTemplate
TWizardSideBarListItemTemplate
TWizardSideBarTemplate
TWizardStartNavigationTemplate
TWizardStep
TWizardStepCollection
TWizardStepNavigationTemplate
TWizardStepType
TXmlTransform
Keyword

Class TCheckBoxList

Direct Known Sub-classes:

TCheckBoxList class

TCheckBoxList displays a list of checkboxes on a Web page.

The layout of the checkbox list is specified via RepeatLayout, which can be either 'Table' (default) or 'Flow'. A table layout uses HTML table cells to organize the checkboxes while a flow layout uses line breaks to organize the checkboxes. When the layout is using 'Table', CellPadding and CellSpacing can be used to adjust the cellpadding and cellpadding of the table.

The number of columns used to display the checkboxes is specified via RepeatColumns property, while the RepeatDirection governs the order of the items being rendered.

The alignment of the text besides each checkbox can be specified via TextAlign.

Since: 3.0
Author: Qiang Xue <qiang.xue@gmail.com>
Constants Inherited From TControl
AUTOMATIC_ID_PREFIX, CLIENT_ID_SEPARATOR, CS_CHILD_INITIALIZED, CS_CONSTRUCTED, CS_INITIALIZED, CS_LOADED, CS_PRERENDERED, CS_STATE_LOADED, ID_FORMAT, ID_SEPARATOR, IS_CHILD_CREATED, IS_CREATING_CHILD, IS_DISABLE_THEMING, IS_DISABLE_VIEWSTATE, IS_ID_SET, IS_SKIN_APPLIED, IS_STYLESHEET_APPLIED, RF_ADAPTER, RF_AUTO_BINDINGS, RF_CHILD_STATE, RF_CONTROLS, RF_CONTROLSTATE, RF_DATA_BINDINGS, RF_EVENTS, RF_NAMED_CONTROLS, RF_NAMED_CONTROLS_ID, RF_NAMED_OBJECTS, RF_SKIN_ID,

Constructor Summary
public
Constructor.

Method Summary
protected  TControl
Creates a control used for repetition (used as a template).
protected  TStyle
Creates a style object for the control.
TControl
findControl ( string $id)
Finds a control by ID.
null
generateItemStyle ( string $itemType, integer $index)
Returns a style used for rendering items.
integer
integer
protected  string
Gets the name of the javascript class responsible for performing postback for this control.
boolean
Returns a value indicating whether postback has caused the control data change.
boolean
Returns a value indicating whether this control contains footer item.
boolean
Returns a value indicating whether this control contains header item.
boolean
Returns a value indicating whether this control contains separator items.
protected  boolean
bool
Returns true if this control validated successfully.
protected  array
Gets the post back options for this checkbox.
integer
string
protected  TRepeatInfo
string
protected  boolean
Wether the list should be rendered inside a span or not
TTextAlign
mixed
Returns the value to be validated.
boolean
loadPostData ( string $key, array $values)
Loads user input data.
void
onPreRender ( mixed $param)
Registers for post data on postback.
void
Raises postdata changed event.
void
render ( THtmlWriter $writer)
Renders the checkbox list control.
void
renderItem ( THtmlWriter $writer, TRepeatInfo $repeatInfo, string $itemType, integer $index)
Renders an item in the list.
void
setCellPadding ( integer $value)
Sets the cellpadding for the table keeping the checkbox list.
void
setCellSpacing ( integer $value)
Sets the cellspacing for the table keeping the checkbox list.
void
setIsValid ( bool $value)
void
setRepeatColumns ( integer $value)
void
setRepeatDirection ( string $value)
void
setRepeatLayout ( string $value)
void
Methods Inherited From TListControl
TListControl::addAttributesToRender(), TListControl::addParsedObject(), TListControl::clearSelection(), TListControl::createListItemCollection(), TListControl::formatDataValue(), TListControl::getAppendDataBoundItems(), TListControl::getAutoPostBack(), TListControl::getCausesValidation(), TListControl::getClientClassName(), TListControl::getData(), TListControl::getDataGroupField(), TListControl::getDataTextField(), TListControl::getDataTextFormatString(), TListControl::getDataValueField(), TListControl::getEnableClientScript(), TListControl::getHasItems(), TListControl::getIsMultiSelect(), TListControl::getItemCount(), TListControl::getItems(), TListControl::getPostBackOptions(), TListControl::getPromptText(), TListControl::getPromptValue(), TListControl::getSelectedIndex(), TListControl::getSelectedIndices(), TListControl::getSelectedItem(), TListControl::getSelectedValue(), TListControl::getSelectedValues(), TListControl::getTagName(), TListControl::getText(), TListControl::getValidationGroup(), TListControl::loadState(), TListControl::onSelectedIndexChanged(), TListControl::onTextChanged(), TListControl::performDataBinding(), TListControl::renderClientControlScript(), TListControl::renderContents(), TListControl::renderPrompt(), TListControl::saveState(), TListControl::setAppendDataBoundItems(), TListControl::setAutoPostBack(), TListControl::setCausesValidation(), TListControl::setData(), TListControl::setDataGroupField(), TListControl::setDataTextField(), TListControl::setDataTextFormatString(), TListControl::setDataValueField(), TListControl::setEnableClientScript(), TListControl::setPromptText(), TListControl::setPromptValue(), TListControl::setSelectedIndex(), TListControl::setSelectedIndices(), TListControl::setSelectedValue(), TListControl::setSelectedValues(), TListControl::setText(), TListControl::setValidationGroup()
Methods Inherited From TDataBoundControl
TDataBoundControl::createPagedDataSource(), TDataBoundControl::dataBind(), TDataBoundControl::dataSourceViewChanged(), TDataBoundControl::determineDataSource(), TDataBoundControl::ensureDataBound(), TDataBoundControl::getAllowCustomPaging(), TDataBoundControl::getAllowPaging(), TDataBoundControl::getCurrentPageIndex(), TDataBoundControl::getDataMember(), TDataBoundControl::getDataSource(), TDataBoundControl::getDataSourceID(), TDataBoundControl::getDataSourceView(), TDataBoundControl::getInitialized(), TDataBoundControl::getIsDataBound(), TDataBoundControl::getPageCount(), TDataBoundControl::getPageSize(), TDataBoundControl::getRequiresDataBinding(), TDataBoundControl::getSelectParameters(), TDataBoundControl::getUsingDataSourceID(), TDataBoundControl::getVirtualItemCount(), TDataBoundControl::onDataBound(), TDataBoundControl::onDataSourceChanged(), TDataBoundControl::onInit(), TDataBoundControl::onPreRender(), TDataBoundControl::pagePreLoad(), TDataBoundControl::setAllowCustomPaging(), TDataBoundControl::setAllowPaging(), TDataBoundControl::setCurrentPageIndex(), TDataBoundControl::setDataMember(), TDataBoundControl::setDataSource(), TDataBoundControl::setDataSourceID(), TDataBoundControl::setInitialized(), TDataBoundControl::setIsDataBound(), TDataBoundControl::setPageSize(), TDataBoundControl::setRequiresDataBinding(), TDataBoundControl::setVirtualItemCount(), TDataBoundControl::validateDataSource()
Methods Inherited From TWebControl
TWebControl::addAttributesToRender(), TWebControl::clearStyle(), TWebControl::copyBaseAttributes(), TWebControl::createStyle(), TWebControl::getAccessKey(), TWebControl::getBackColor(), TWebControl::getBorderColor(), TWebControl::getBorderStyle(), TWebControl::getBorderWidth(), TWebControl::getCssClass(), TWebControl::getDisplay(), TWebControl::getFont(), TWebControl::getForeColor(), TWebControl::getHasStyle(), TWebControl::getHeight(), TWebControl::getStyle(), TWebControl::getTabIndex(), TWebControl::getTagName(), TWebControl::getToolTip(), TWebControl::getWidth(), TWebControl::render(), TWebControl::renderBeginTag(), TWebControl::renderContents(), TWebControl::renderEndTag(), TWebControl::setAccessKey(), TWebControl::setBackColor(), TWebControl::setBorderColor(), TWebControl::setBorderStyle(), TWebControl::setBorderWidth(), TWebControl::setCssClass(), TWebControl::setDisplay(), TWebControl::setForeColor(), TWebControl::setHeight(), TWebControl::setStyle(), TWebControl::setTabIndex(), TWebControl::setToolTip(), TWebControl::setWidth()
Methods Inherited From TControl
TControl::addedControl(), TControl::addParsedObject(), TControl::addToPostDataLoader(), TControl::applyStyleSheetSkin(), TControl::autoBindProperty(), TControl::autoDataBindProperties(), TControl::bindProperty(), TControl::broadcastEvent(), TControl::bubbleEvent(), TControl::clearChildState(), TControl::clearControlState(), TControl::clearNamingContainer(), TControl::clearViewState(), TControl::convertUniqueIdToClientId(), TControl::createChildControls(), TControl::createControlCollection(), TControl::dataBind(), TControl::dataBindChildren(), TControl::dataBindProperties(), TControl::ensureChildControls(), TControl::findControl(), TControl::findControlsByID(), TControl::findControlsByType(), TControl::focus(), TControl::getAdapter(), TControl::getAllowChildControls(), TControl::getAttribute(), TControl::getAttributes(), TControl::getChildControlsCreated(), TControl::getClientID(), TControl::getControls(), TControl::getControlStage(), TControl::getControlState(), TControl::getCustomData(), TControl::getEnabled(), TControl::getEnableTheming(), TControl::getEnableViewState(), TControl::getHasAdapter(), TControl::getHasAttributes(), TControl::getHasChildInitialized(), TControl::getHasControls(), TControl::getHasInitialized(), TControl::getHasLoaded(), TControl::getHasLoadedPostData(), TControl::getHasPreRendered(), TControl::getID(), TControl::getNamingContainer(), TControl::getPage(), TControl::getParent(), TControl::getRegisteredObject(), TControl::getSkinID(), TControl::getSourceTemplateControl(), TControl::getTemplateControl(), TControl::getUniqueID(), TControl::getViewState(), TControl::getVisible(), TControl::hasAttribute(), TControl::initRecursive(), TControl::isDescendentOf(), TControl::isObjectRegistered(), TControl::loadRecursive(), TControl::loadState(), TControl::loadStateRecursive(), TControl::onDataBinding(), TControl::onInit(), TControl::onLoad(), TControl::onPreRender(), TControl::onUnload(), TControl::preRenderRecursive(), TControl::raiseBubbleEvent(), TControl::registerObject(), TControl::removeAttribute(), TControl::removedControl(), TControl::render(), TControl::renderChildren(), TControl::renderControl(), TControl::saveState(), TControl::saveStateRecursive(), TControl::setAdapter(), TControl::setAttribute(), TControl::setChildControlsCreated(), TControl::setControlStage(), TControl::setControlState(), TControl::setCustomData(), TControl::setEnabled(), TControl::setEnableTheming(), TControl::setEnableViewState(), TControl::setID(), TControl::setPage(), TControl::setSkinID(), TControl::setTemplateControl(), TControl::setViewState(), TControl::setVisible(), TControl::trackViewState(), TControl::traverseChildControls(), TControl::unbindProperty(), TControl::unloadRecursive(), TControl::unregisterObject(), TControl::__get()
Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()
Methods Inherited From TComponent
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Constant Summary

Constructor Details

__construct

public __construct

Constructor.

Remember to call parent implementation if you override this method


Method Details

createRepeatedControl

protected TControl createRepeatedControl ()

Creates a control used for repetition (used as a template).

Output
TControl the control to be repeated
Exception

createStyle

protected TStyle createStyle ()

Creates a style object for the control.

This method creates a TTableStyle to be used by checkbox list.

Output
TStyle control style to be used
Exception

findControl

public TControl findControl (string $id )

Finds a control by ID.

This method overrides the parent implementation so that it always returns the checkbox list itself (because the checkbox list does not have child controls.)

Input
string$idcontrol ID
Output
TControl control being found
Exception

generateItemStyle

public null generateItemStyle (string $itemType , integer $index )

Returns a style used for rendering items.

This method is required by IRepeatInfoUser interface.

Input
string$itemTypeitem type (Header,Footer,Item,AlternatingItem,SelectedItem,EditItem,Separator,Pager)
integer$indexindex of the item being rendered
Output
Exception

getCellPadding

public integer getCellPadding ()

Output
integer the cellpadding for the table keeping the checkbox list. Defaults to -1, meaning not set.
Exception

getCellSpacing

public integer getCellSpacing ()

Output
integer the cellspacing for the table keeping the checkbox list. Defaults to -1, meaning not set.
Exception

getClientClassName

protected string getClientClassName ()

Gets the name of the javascript class responsible for performing postback for this control.

This method overrides the parent implementation.

Output
string the javascript class name
Exception

getDataChanged

public boolean getDataChanged ()

Returns a value indicating whether postback has caused the control data change.

This method is required by the IPostBackDataHandler interface.

Output
boolean whether postback has caused the control data change. False if the page is not in postback mode.
Exception

getHasFooter

public boolean getHasFooter ()

Returns a value indicating whether this control contains footer item.

This method is required by IRepeatInfoUser interface.

Output
boolean always false.
Exception

getHasHeader

public boolean getHasHeader ()

Returns a value indicating whether this control contains header item.

This method is required by IRepeatInfoUser interface.

Output
boolean always false.
Exception

getHasSeparators

public boolean getHasSeparators ()

Returns a value indicating whether this control contains separator items.

This method is required by IRepeatInfoUser interface.

Output
boolean always false.
Exception

getIsMultiSelect

protected boolean getIsMultiSelect ()

Output
boolean whether this control supports multiple selection. Always true for checkbox list.
Exception

getIsValid

public bool getIsValid ()

Returns true if this control validated successfully.

Defaults to true.

Output
bool wether this control validated successfully.
Exception

getPostBackOptions

protected array getPostBackOptions ()

Gets the post back options for this checkbox.

Output
Exception

getRepeatColumns

public integer getRepeatColumns ()

Output
integer the number of columns that the list should be displayed with. Defaults to 0 meaning not set.
Exception

getRepeatDirection

public string getRepeatDirection ()

Output
string the direction of traversing the list, defaults to 'Vertical'
Exception

getRepeatInfo

protected TRepeatInfo getRepeatInfo ()

Output
TRepeatInfo repeat information (primarily used by control developers)
Exception

getRepeatLayout

public string getRepeatLayout ()

Output
string how the list should be displayed, using table or using line breaks. Defaults to 'Table'.
Exception

getSpanNeeded

protected boolean getSpanNeeded ()

Wether the list should be rendered inside a span or not

Output
boolean true if we need a span
Exception

getTextAlign

public TTextAlign getTextAlign ()

Output
TTextAlign the alignment of the text caption, defaults to TTextAlign::Right.
Exception

getValidationPropertyValue

public mixed getValidationPropertyValue ()

Returns the value to be validated.

This methid is required by IValidatable interface.

Output
mixed the value of the property to be validated.
Exception

loadPostData

public boolean loadPostData (string $key , array $values )

Loads user input data.

This method is primarly used by framework developers.

Input
string$keythe key that can be used to retrieve data from the input data collection
array$valuesthe input data collection
Output
boolean whether the data of the control has been changed
Exception

onPreRender

public void onPreRender (mixed $param )

Registers for post data on postback.

This method overrides the parent implementation.

Input
mixed$paramevent parameter
Output
Exception

raisePostDataChangedEvent

public void raisePostDataChangedEvent ()

Raises postdata changed event.

This method is required by IPostBackDataHandler interface. It is invoked by the framework when SelectedIndices property is changed on postback. This method is primarly used by framework developers.

Output
Exception

render

public void render (THtmlWriter $writer )

Renders the checkbox list control.

This method overrides the parent implementation.

Input
THtmlWriter$writerwriter for rendering purpose.
Output
Exception

renderItem

public void renderItem (THtmlWriter $writer , TRepeatInfo $repeatInfo , string $itemType , integer $index )

Renders an item in the list.

This method is required by IRepeatInfoUser interface.

Input
THtmlWriter$writerwriter for rendering purpose
TRepeatInfo$repeatInforepeat information
string$itemTypeitem type (Header,Footer,Item,AlternatingItem,SelectedItem,EditItem,Separator,Pager)
integer$indexzero-based index of the item in the item list
Output
Exception

setCellPadding

public void setCellPadding (integer $value )

Sets the cellpadding for the table keeping the checkbox list.

Input
integer$valuethe cellpadding for the table keeping the checkbox list.
Output
Exception

setCellSpacing

public void setCellSpacing (integer $value )

Sets the cellspacing for the table keeping the checkbox list.

Input
integer$valuethe cellspacing for the table keeping the checkbox list.
Output
Exception

setIsValid

public void setIsValid (bool $value )

Input
bool$valuewether this control is valid.
Output
Exception

setRepeatColumns

public void setRepeatColumns (integer $value )

Input
integer$valuethe number of columns that the list should be displayed with.
Output
Exception

setRepeatDirection

public void setRepeatDirection (string $value )

Input
string$valuethe direction (Vertical, Horizontal) of traversing the list
Output
Exception

setRepeatLayout

public void setRepeatLayout (string $value )

Input
string$valuehow the list should be displayed, using table or using line breaks (Table, Flow)
Output
Exception

setTextAlign

public void setTextAlign (TTextAlign $value )

Input
TTextAlign$valuethe text alignment of the checkboxes
Output
Exception