Class THyperLinkColumn
THyperLinkColumn class
THyperLinkColumn contains a hyperlink for each item in the column. You can set the text and the url of the hyperlink by Text and NavigateUrl properties, respectively. You can also bind the text and url to specific data field in datasource by setting DataTextField and DataNavigateUrlField. Both can be formatted before rendering according to the DataTextFormatString and and DataNavigateUrlFormatString properties, respectively. If both Text and DataTextField are present, the latter takes precedence. The same rule applies to NavigateUrl and DataNavigateUrlField properties. The hyperlinks in the column can be accessed by one of the following two methods: - $datagridItem->HyperLinkColumnID->HyperLink
- $datagridItem->HyperLinkColumnID->Controls[0]
The second method is possible because the hyperlink control created within the datagrid cell is the first child.
| Method Summary |
|
void
|
Databinds a cell in the column.
|
|
string
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
string
|
|
|
void
|
Initializes the specified cell to its initial values.
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
|
|
void
|
Sets the URL to link to when the hyperlink is clicked.
|
|
void
|
Sets the target window or frame to display the Web page content linked to when the hyperlink is clicked.
|
|
void
|
Sets the text caption of the hyperlink.
|
| Methods Inherited From TDataGridColumn |
|
TDataGridColumn::formatDataValue(), TDataGridColumn::getAllowSorting(), TDataGridColumn::getDataFieldValue(), TDataGridColumn::getEnableCellGrouping(), TDataGridColumn::getFooterRenderer(), TDataGridColumn::getFooterStyle(), TDataGridColumn::getFooterText(), TDataGridColumn::getHeaderImageUrl(), TDataGridColumn::getHeaderRenderer(), TDataGridColumn::getHeaderStyle(), TDataGridColumn::getHeaderText(), TDataGridColumn::getID(), TDataGridColumn::getItemStyle(), TDataGridColumn::getOwner(), TDataGridColumn::getSortExpression(), TDataGridColumn::getViewState(), TDataGridColumn::getVisible(), TDataGridColumn::initialize(), TDataGridColumn::initializeCell(), TDataGridColumn::initializeFooterCell(), TDataGridColumn::initializeHeaderCell(), TDataGridColumn::loadState(), TDataGridColumn::saveState(), TDataGridColumn::setEnableCellGrouping(), TDataGridColumn::setFooterRenderer(), TDataGridColumn::setFooterText(), TDataGridColumn::setHeaderImageUrl(), TDataGridColumn::setHeaderRenderer(), TDataGridColumn::setHeaderText(), TDataGridColumn::setID(), TDataGridColumn::setOwner(), TDataGridColumn::setSortExpression(), TDataGridColumn::setViewState(), TDataGridColumn::setVisible()
|
| 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()
|
| Method Details |
dataBindColumn
| public void dataBindColumn |
(mixed $sender , mixed $param ) |
Databinds a cell in the column.
This method is invoked when datagrid performs databinding. It populates the content of the cell with the relevant data from data source.
| Input |
| mixed | $sender | |
| mixed | $param | |
| Output |
| Exception |
|
getDataNavigateUrlField
| public string getDataNavigateUrlField |
() |
| Output |
|
string
| the field name from the data source to bind to the navigate url of hyperlink |
| Exception |
|
getDataNavigateUrlFormatString
| public string getDataNavigateUrlFormatString |
() |
| Output |
|
string
| the formatting string used to control how the navigate url of hyperlink will be displayed. |
| Exception |
|
getDataTextField
| public string getDataTextField |
() |
| Output |
|
string
| the field name from the data source to bind to the hyperlink caption |
| Exception |
|
getDataTextFormatString
| public string getDataTextFormatString |
() |
| Output |
|
string
| the formatting string used to control how the hyperlink caption will be displayed. |
| Exception |
|
getNavigateUrl
| public string getNavigateUrl |
() |
| Output |
|
string
| the URL to link to when the hyperlink is clicked. |
| Exception |
|
getTarget
| public string getTarget |
() |
| Output |
|
string
| the target window or frame to display the Web page content linked to when the hyperlink is clicked. |
| Exception |
|
getText
| Output |
|
string
| the text caption of the hyperlink |
| Exception |
|
initializeCell
| public void initializeCell |
(TTableCell $cell , integer $columnIndex , string $itemType ) |
Initializes the specified cell to its initial values.
This method overrides the parent implementation. It creates a hyperlink within the cell.
| Input |
| TTableCell | $cell | the cell to be initialized. |
| integer | $columnIndex | the index to the Columns property that the cell resides in. |
| string | $itemType | the type of cell (Header,Footer,Item,AlternatingItem,EditItem,SelectedItem) |
| Output |
| Exception |
|
setDataNavigateUrlField
| public void setDataNavigateUrlField |
(string $value ) |
| Input |
| string | $value | the field name from the data source to bind to the navigate url of hyperlink |
| Output |
| Exception |
|
setDataNavigateUrlFormatString
| public void setDataNavigateUrlFormatString |
(string $value ) |
| Input |
| string | $value | the formatting string used to control how the navigate url of hyperlink will be displayed. |
| Output |
| Exception |
|
setDataTextField
| public void setDataTextField |
(string $value ) |
| Input |
| string | $value | the field name from the data source to bind to the hyperlink caption |
| Output |
| Exception |
|
setDataTextFormatString
| public void setDataTextFormatString |
(string $value ) |
| Input |
| string | $value | the formatting string used to control how the hyperlink caption will be displayed. |
| Output |
| Exception |
|
setNavigateUrl
| public void setNavigateUrl |
(string $value ) |
Sets the URL to link to when the hyperlink is clicked.
| Input |
| string | $value | the URL |
| Output |
| Exception |
|
setTarget
| public void setTarget |
(string $value ) |
Sets the target window or frame to display the Web page content linked to when the hyperlink is clicked.
| Input |
| string | $value | the target window, valid values include '_blank', '_parent', '_self', '_top' and empty string. |
| Output |
| Exception |
|
setText
| public void setText |
(string $value ) |
Sets the text caption of the hyperlink.
| Input |
| string | $value | the text caption to be set |
| Output |
| Exception |
|
|