New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Each row in a Hyperlink column will contain a predefined hyperlink. This link is not the same for the whole column and can be defined for each row individually.

The content of the column can be bound to a field in a data source or to a static text. You can customize the look of the links by using CSS classes.

You can set multiple fields to a GridHyperlinkColumn through its DataNavigateUrlFields property. These fields can later be used when setting the DataNavigateUrlFormatString property and be part of a query string:

csharp
<radG:GridHyperLinkColumn     DataNavigateUrlFields= "ProductID,OrderID"     DataNavigateUrlFormatString= "~/Details.aspx?ProductID={0}&OrderID={1}"></radG:GridHyperLinkColumn>

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class GridHyperLinkColumn : GridColumn, IStateManager, IComparable, IGridDataColumn

Inheritance: objectGridColumnGridHyperLinkColumn

Implements: IComparableIGridDataColumnIStateManager

Inherited Members GridColumn.Initialize()GridColumn.InitializeCell(TableCell, int, GridItem)GridColumn.ShouldSerializeFilterImageUrl()GridColumn.ShouldSerializeSortAscImageUrl()GridColumn.ShouldSerializeSortDescImageUrl()GridColumn.RefreshCurrentFilterValue(GridFilteringItem, string)GridColumn.RefreshCurrentFilterValue(GridFilteringItem)GridColumn.SetCurrentFilterValueToControl(TableCell)GridColumn.GetCurrentFilterValueFromControl(TableCell)GridColumn.EvaluateFilterExpression(GridFilteringItem)GridColumn.EvaluateFilterExpression()GridColumn.FunctionTakesNoArguments(GridKnownFunction)GridColumn.SetupFilterControls(TableCell)GridColumn.GetFilterFunctionsList(GridFilterListOptions, ArrayList)GridColumn.PrepareCell(TableCell, GridItem)GridColumn.LoadViewState(object)GridColumn.OnColumnChanged()GridColumn.SaveViewState()GridColumn.TrackViewState()GridColumn.ResetCurrentFilterValue(GridFilteringItem)GridColumn.ResetCurrentFilterValue()GridColumn.IsUniqueName(string)GridColumn.GenerateUniqueNameBase(string)GridColumn.TrySetOnClientClickScript(Control, GridItem, string, params string[])GridColumn.UpdateUniqueNameIfDefault(string)GridColumn.HeaderTooltipGridColumn.HeaderAbbrGridColumn.HeaderAxisGridColumn.SortedBackColorGridColumn.CurrentFilterValueGridColumn.AndCurrentFilterValueGridColumn.ColumnGroupNameGridColumn.SelectedGridColumn.SelectableGridColumn.SortableGridColumn.CurrentFilterFunctionGridColumn.AndCurrentFilterFunctionGridColumn.FilterDelayGridColumn.ExportableGridColumn.EnableHeaderContextMenuGridColumn.ShowFilterIconGridColumn.FilterListOptionsGridColumn.AutoPostBackOnFilterGridColumn.FilterImageToolTipGridColumn.FilterControlToolTipGridColumn.EditorControlToolTipGridColumn.FilterImageUrlGridColumn.SortAscImageUrlGridColumn.SortDescImageUrlGridColumn.DataTypeNameGridColumn.ListOfFilterValuesGridColumn.FilterTemplateGridColumn.TableViewSpecificStateGridColumn.DesignModeGridColumn.FooterStyleGridColumn.FooterTextGridColumn.HeaderImageUrlGridColumn.HeaderStyleGridColumn.HeaderTextGridColumn.IsTrackingViewStateGridColumn.ItemStyleGridColumn.OwnerGridColumn.SortExpressionGridColumn.GroupByExpressionGridColumn.ViewStateGridColumn.ShowSortIconGridColumn.ShowNoSortIconGridColumn.VisibleGridColumn.DisplayGridColumn.OwnerIDGridColumn.OwnerGridIDGridColumn.ResizableGridColumn.ReorderableGridColumn.GroupableGridColumn.ColumnTypeGridColumn.HeaderButtonTypeGridColumn.OrderIndexGridColumn.IsEditableGridColumn.IsDefaultUniqueNameGridColumn.EditFormColumnIndexGridColumn.UniqueNameGridColumn.EditFormHeaderTextFormatGridColumn.DataTypeGridColumn.FilterControlWidthGridColumn.FilterControlAltTextGridColumn.FilterCheckListWebServiceMethodGridColumn.FilterCheckListEnableLoadOnDemandobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public GridHyperLinkColumn()

Properties

Gets or sets whether the column data can be filtered. The default value is true.

C#
public virtual bool AllowFiltering { get; set; }
Property Value:

A Boolean value, indicating whether the column can be filtered.

Implements: IGridDataColumn.AllowFiltering

Gets or sets a whether the column data can be sorted.

C#
public virtual bool AllowSorting { get; set; }
Property Value:

A boolean value, indicating whether the column data can be sorted.

Implements: IGridDataColumn.AllowSorting

Gets or sets a string, representing a comma-separated enumeration of DataFields from the data source, which will form the url of the windwow/frame that the hyperlink will target.

C#
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[TypeConverter(typeof(GridStringArrayConverter))]
public virtual string[] DataNavigateUrlFields { get; set; }
Property Value:

A string, representing a comma-separated enumeration of DataFields from the data source, which will form the url of the windwow/frame that the hyperlink will target.

Gets or sets a string, specifying the FormatString of the DataNavigateURL. Essentially, the DataNavigateUrlFormatString property sets the formatting for the url string of the target window or frame.

C#
public virtual string DataNavigateUrlFormatString { get; set; }
Property Value:

A string, specifying the FormatString of the DataNavigateURL.

Gets or sets a string, representing the DataField name from the data source, which will be used to supply the text for the hyperlink in the column. This text can further be customized, by using the DataTextFormatString property.

C#
public virtual string DataTextField { get; set; }
Property Value:

A string, representing the DataField name from the data source, which will be used to supply the text for the hyperlink in the column.

Gets or sets a string, specifying the format string, which will be used to format the text of the hyperlink, rendered in the cells of the column.

C#
public virtual string DataTextFormatString { get; set; }
Property Value:

A string, specifying the format string, which will be used to format the text of the hyperlink, rendered in the cells of the column.

Gets or sets a value specifying the ImageUrl property of the HyperLink control rendered in every data cell of the GridHyperLinkColumn.

C#
public virtual string ImageUrl { get; set; }

Gets or sets a string, specifying the url, to which to navigate, when a hyperlink within a column is pressed. This property will be honored only if the DataNavigateUrlFields are not set. If either DataNavigateUrlFields are set, they will override the NavigateUrl property.

C#
public virtual string NavigateUrl { get; set; }
Property Value:

A a string, specifying the url, to which to navigate, when a hyperlink within a column is pressed.

Sets or gets a string, specifying the window or frame at which to target content. The possible values are:

_blank - the target URL will open in a new window
_self - the target URL will open in the same frame as it was clicked
_parent - the target URL will open in the parent frameset
_top - the target URL will open in the full body of the window

C#
public virtual string Target { get; set; }
Property Value:

A string, specifying the window or frame at which to target content.

Gets or sets a string, specifying the text to be displayed by the hyperlinks in the column, when there is no DataTextField specified.

C#
public virtual string Text { get; set; }
Property Value:

A string, specifying the text to be displayed by the hyperlinks in the column, when there is no DataTextField specified.

Methods

Creates a copy of the current column.

C#
public override GridColumn Clone()
Returns:

GridColumn

Overrides: GridColumn.Clone()

Note: When implementing/overriding this method be sure to call the base member or call CopyBaseProperties to be sure that all base properties will be copied accordingly

C#
protected override void CopyBaseProperties(GridColumn fromColumn)
Parameters:fromColumnGridColumn

Overrides: GridColumn.CopyBaseProperties(GridColumn)

C#
protected virtual string FormatDataNavigateUrlValue(object[] dataUrlValues)
Parameters:dataUrlValuesobject[]Returns:

string

C#
protected virtual string FormatDataTextValue(object dataTextValue)
Parameters:dataTextValueobjectReturns:

string

C#
protected override string GenerateUniqueName()
Returns:

string

Overrides: GridColumn.GenerateUniqueName()

Returns the DataField that will be used for Filter and Sorting operations

C#
public string GetActiveDataField()
Returns:

string

Implements: IGridDataColumn.GetActiveDataField()

This method should be used in case you develop your own column. It returns the full list of DataFields used by the column. GridTableView uses this to decide which DataFields from the specified DataSource will be inlcuded in case of GridTableView.RetrieveAllDataFields is set to false.

C#
public override IDictionary GetCustomPropertyDataFields(object dataItemInstance)
Parameters:dataItemInstanceobjectReturns:

IDictionary

Overrides: GridColumn.GetCustomPropertyDataFields(object)

Calculate the default Group-by expression based on the settings of the DataField (if available)

C#
public override string GetDefaultGroupByExpression()
Returns:

string

Overrides: GridColumn.GetDefaultGroupByExpression()

For example, if a column's DataField is ProductType the default group-by expression will be: 'ProductType Group By ProductType'

C#
protected override string GetFilterDataField()
Returns:

string

Overrides: GridColumn.GetFilterDataField()

This method returns true if the column is bound to the specified field name.

C#
public override bool IsBoundToFieldName(string name)
Parameters:namestring

The name of the DataField, which will be checked.

Returns:

bool

Overrides: GridColumn.IsBoundToFieldName(string)

Determines whether [is bound to field name] [the specified URL fields].

C#
public bool IsBoundToFieldName(string[] urlFields, string name)
Parameters:urlFieldsstring[]

The URL fields.

namestring

The name.

Returns:

bool

This method should be used in case you develop your own column. It returns true if the column supports filtering.

C#
public override bool SupportsFiltering()
Returns:

bool

Returns if the column supports filtering.

Overrides: GridColumn.SupportsFiltering()