System.Web.UI.WebControls
[ class tree: System.Web.UI.WebControls ] [ index: System.Web.UI.WebControls ] [ all elements ]

Class: THyperLinkColumn

Source Location: /Web/UI/WebControls/THyperLinkColumn.php

Class Overview

TComponent
   |
   --TControl
      |
      --TDataGridColumn
         |
         --THyperLinkColumn

THyperLinkColumn class

Class Details

[line 63]
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 DataNavigateUrlFormatString properties, respectively. If both Text and DataTextField are present, the latter takes precedence. The same rule applies to NavigateUrl and DataNavigateUrlField properties.

Namespace: System.Web.UI.WebControls

Properties

  • Text, string, kept in viewstate
    Gets or sets the text of the hyperlink
  • EncodeText, boolean, default=true, kept in viewstate
    Gets or sets the value indicating whether the hyperlink text should be HTML-encoded when rendering.
  • DataTextField, string, kept in viewstate
    Gets or sets the name of the data field associated with the text of the hyperlink
  • DataTextFormatString, string, kept in viewstate
    Gets or sets the string that is used to format the DataTextField value for the hyperlink text. The format string is used as the first argument to the sprintf() function.
  • NavigateUrl, string, kept in viewstate
    Gets or sets the url of the hyperlink
  • DataNavigateUrlField, string, kept in viewstate
    Gets or sets the name of the data field associated with the url of the hyperlink
  • DataNavigateUrlFormatString, string, kept in viewstate
    Gets or sets the string that is used to format the DataNavigateUrlField value for the hyperlink url. The format string is used as the first argument to the sprintf() function.
  • Target, string, kept in viewstate
    Gets or sets the target window or frame to display the Web page content linked to when the hyperlink component is clicked. Valid values include '_blank', '_parent', '_self', '_top', and empty string.




version:  v1.0, last update on 2004/08/13 21:44:52
author:  Qiang Xue <qiang.xue@gmail.com>


[ Top ]

Methods


Inherited Variables

Inherited Methods

Class: TDataGridColumn

TDataGridColumn::getFooterStyle()
TDataGridColumn::getFooterText()
TDataGridColumn::getHeaderImageUrl()
TDataGridColumn::getHeaderStyle()
TDataGridColumn::getHeaderText()
TDataGridColumn::getItemStyle()
TDataGridColumn::getSortExpression()
TDataGridColumn::initializeCell()
Initializes the specified cell to its initial values.
TDataGridColumn::propagateAttribute()
Propagate the attributes in the columns to the cells.
TDataGridColumn::setFooterStyle()
TDataGridColumn::setFooterText()
TDataGridColumn::setHeaderImageUrl()
TDataGridColumn::setHeaderStyle()
TDataGridColumn::setHeaderText()
TDataGridColumn::setItemStyle()
TDataGridColumn::setSortExpression()

Class: TControl

TControl::__construct()
Constructor.
TControl::addBody()
Appends an object into the body collection of this control.
TControl::addParsedObject()
Adds the object parsed in template as a body of the component.
TControl::allowBody()
Determines whether the control can add the object as a body.
TControl::clearViewState()
Clears viewstate
TControl::findBodyControl()
TControl::getAttribute()
TControl::getAttributes()
Returns the attribute list object.
TControl::getAttributesToRender()
Returns attributes to be rendered.
TControl::getBodies()
TControl::getClientID()
Returns the client ID of the component.
TControl::getContainer()
Returns the container of this component.
TControl::getSkinName()
TControl::getTagName()
TControl::getViewState()
Returns a viewstate value.
TControl::initSkin()
Initializes a skin for the control. If a skin name is provided then that skin will be loaded.
TControl::isViewStateEnabled()
TControl::isVisible()
This method checks whether a control is visible.
TControl::loadViewState()
Loads viewstate into this component and its children.
TControl::onBubbleEvent()
This method responds to a bubbled event.
TControl::onInit()
This method is invoked when the control enters 'Init' stage.
TControl::onInitRecursive()
Calls onInit of this control and its children recursively.
TControl::onLoad()
This method is invoked when the control enters 'Load' stage.
TControl::onLoadRecursive()
Calls onLoad of this control and its children recursively.
TControl::onPreRender()
This method is invoked when the control enters 'PreRender' stage.
TControl::onPreRenderRecursive()
Calls onPreRender of this control and its children recursively.
TControl::onUnload()
This method is invoked when the control enters 'Unload' stage.
TControl::onUnloadRecursive()
Calls onUnload of this control and its children recursively.
TControl::raiseBubbleEvent()
Invokes the parent's onBubbleEvent method.
TControl::removeBodies()
Removes all body content.
TControl::render()
Renders this control.
TControl::renderAttributes()
Renders the attributes.
TControl::renderBody()
Renders the body content.
TControl::saveViewState()
Returns the viewstate of this component and its children.
TControl::setAttribute()
Sets an attribute.
TControl::setContainer()
Sets the container of this component
TControl::setEnableViewState()
TControl::setSkinName()
Sets the skin to use for this control
TControl::setTagName()
Sets the tag name.
TControl::setViewState()
Sets a viewstate value.
TControl::setVisible()
TControl::synchronizeControl()
This method should only be used by framework developer.

Class: TComponent

TComponent::__construct()
Constructor.
TComponent::addChild()
Adds a child component.
TComponent::addParsedObject()
Handles a component or string met in template.
TComponent::attachEventHandler()
Attaches a handler function to an event.
TComponent::bindProperty()
Sets up the binding between a property and an expression.
TComponent::canGetProperty()
Determines whether a property can be read.
TComponent::canSetProperty()
Determines whether a property can be written.
TComponent::createComponent()
Creates a child component.
TComponent::dataBind()
Performs the databinding for this component.
TComponent::evaluateExpression()
Evaluates a PHP expression.
TComponent::evaluateStatements()
Evaluates a list of PHP statements.
TComponent::findObject()
Finds an object by its ID path.
TComponent::getApplication()
TComponent::getChild()
TComponent::getChildren()
TComponent::getDefinition()
Returns or builds a component definition.
TComponent::getGlobalization()
Returns the Globalization instance for the application.
TComponent::getID()
TComponent::getModule()
Returns the module object that contains the component or the page containing the component.
TComponent::getPage()
TComponent::getParent()
TComponent::getPropertyInitValue()
Gets the initial value of a property.
TComponent::getPropertyType()
Returns the type of a property
TComponent::getRequest()
Returns the request object associated with application.
TComponent::getServiceManager()
Returns the service manager for this application.
TComponent::getSession()
Returns the session object associated with the application.
TComponent::getSessionState()
Returns a session variable.
TComponent::getUniqueID()
Returns the unique ID of the component.
TComponent::getUser()
Returns the user object associated with the application.
TComponent::hasChildren()
TComponent::hasEvent()
Determines whether an event is defined.
TComponent::hasProperty()
Determines whether a property is defined.
TComponent::initProperties()
Initializes the property values.
TComponent::instantiateTemplate()
Parses a template string and instantiates the content.
TComponent::onDataBinding()
This method is invoked when dataBind is invoked for the component.
TComponent::raiseEvent()
Invokes all attached event handler functions for a particular event.
TComponent::removeChild()
Removes a child component.
TComponent::removeChildren()
Removes all child components.
TComponent::setAttribute()
Sets an attribute.
TComponent::setDefinition()
Sets a component definition.
TComponent::setID()
Sets a component ID.
TComponent::setParent()
Sets the parent of this component.
TComponent::setPropertyInitValue()
Sets the initial value of a property.
TComponent::setRoot()
Sets the root component in the component hierarchy.
TComponent::setSessionState()
Sets a session variable.
TComponent::unbindProperty()
Breaks the binding between a property and an expression.
TComponent::__get()
Returns a property value by name or a child component by ID.
TComponent::__set()
Sets value of a component property.

Class Methods


method formatDataNavigateUrlValue [line 255]

string formatDataNavigateUrlValue( mixed $value)

Formats the navigate url value according to format string.

This method is invoked when setting the navigate url to a cell. This method can be overriden.




return:  the formatted result
access:  protected


Parameters:

mixed   $value   the data associated with the cell

[ Top ]

method formatDataTextValue [line 242]

string formatDataTextValue( mixed $value)

Formats the text value according to format string.

This method is invoked when setting the text to a cell. This method can be overriden.




return:  the formatted result
access:  protected


Parameters:

mixed   $value   the data associated with the cell

[ Top ]

method getDataNavigateUrlField [line 151]

string getDataNavigateUrlField( )



return:  the field name from the data source to bind to the navigate url of hyperlink
access:  public


[ Top ]

method getDataNavigateUrlFormatString [line 167]

string getDataNavigateUrlFormatString( )



return:  the formatting string used to control how the navigate url of hyperlink will be displayed.
access:  public


[ Top ]

method getDataTextField [line 102]

string getDataTextField( )



return:  the field name from the data source to bind to the hyperlink caption
access:  public


[ Top ]

method getDataTextFormatString [line 118]

string getDataTextFormatString( )



return:  the formatting string used to control how the hyperlink caption will be displayed.
access:  public


[ Top ]

method getNavigateUrl [line 134]

string getNavigateUrl( )



return:  the URL to link to when the hyperlink is clicked.
access:  public


[ Top ]

method getTarget [line 183]

string getTarget( )



return:  the target window or frame to display the Web page content linked to when the hyperlink is clicked.
access:  public


[ Top ]

method getText [line 68]

string getText( )



return:  the text caption of the hyperlink
access:  public


[ Top ]

method initializeCell [line 205]

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.




access:  public


Overrides TDataGridColumn::initializeCell() (Initializes the specified cell to its initial values.)

Parameters:

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)

[ Top ]

method isEncodeText [line 85]

boolean isEncodeText( )



return:  whether the text should be HTML encoded before rendering
access:  public


[ Top ]

method setDataNavigateUrlField [line 159]

void setDataNavigateUrlField( string $value)



access:  public


Parameters:

string   $value   the field name from the data source to bind to the navigate url of hyperlink

[ Top ]

method setDataNavigateUrlFormatString [line 175]

void setDataNavigateUrlFormatString( string $value)



access:  public


Parameters:

string   $value   the formatting string used to control how the navigate url of hyperlink will be displayed.

[ Top ]

method setDataTextField [line 110]

void setDataTextField( string $value)



access:  public


Parameters:

string   $value   the field name from the data source to bind to the hyperlink caption

[ Top ]

method setDataTextFormatString [line 126]

void setDataTextFormatString( string $value)



access:  public


Parameters:

string   $value   the formatting string used to control how the hyperlink caption will be displayed.

[ Top ]

method setEncodeText [line 94]

void setEncodeText( boolean $value)

Sets the value indicating whether the text should be HTML encoded before rendering



access:  public


Parameters:

boolean   $value   whether the text should be HTML encoded before rendering

[ Top ]

method setNavigateUrl [line 143]

void setNavigateUrl( string $value)

Sets the URL to link to when the hyperlink is clicked.



access:  public


Parameters:

string   $value   the URL

[ Top ]

method setTarget [line 192]

void setTarget( string $value)

Sets the target window or frame to display the Web page content linked to when the hyperlink is clicked.



access:  public


Parameters:

string   $value   the target window, valid values include '_blank', '_parent', '_self', '_top' and empty string.

[ Top ]

method setText [line 77]

void setText( string $value)

Sets the text caption of the hyperlink.



access:  public


Parameters:

string   $value   the text caption to be set

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.