Edit this page

GridViewHyperlinkColumn

GridViewHyperlinkColumn allows RadGridView to display, format, edit and open hyperlinks as well as run executable files. The default editor of the column is RadTextBoxEditor.

Here is how to create and populate GridViewHyperlinkColumn:

GridViewHyperlinkColumn column = new GridViewHyperlinkColumn("Hyperlink column");
this.radGridView1.Columns.Add(column);

this.radGridView1.Rows.Add("http://www.telerik.com");
this.radGridView1.Rows.Add("http://www.microsoft.com");
this.radGridView1.Rows.Add("http://www.google.com");
this.radGridView1.Rows.Add("http://www.cnn.com");
this.radGridView1.Rows.Add("http://www.bbc.com");
this.radGridView1.Rows.Add("http://www.telerikwatch.com/");
this.radGridView1.Rows.Add("http://www.wikipedia.com");

Dim column As New GridViewHyperlinkColumn("Hyperlink column")
Me.radGridView1.Columns.Add(column)
Me.radGridView1.Rows.Add("http://www.telerik.com")
Me.radGridView1.Rows.Add("http://www.microsoft.com")
Me.radGridView1.Rows.Add("http://www.google.com")
Me.radGridView1.Rows.Add("http://www.cnn.com")
Me.radGridView1.Rows.Add("http://www.bbc.com")
Me.radGridView1.Rows.Add("http://www.telerikwatch.com/")
Me.radGridView1.Rows.Add("http://www.wikipedia.com")

gridview-columns-gridviewhyperlinkcolumn 001

Behavior customization

You can choose the action to open hyperlink or run executable using the HyperlinkOpenAction property of the column. It is an enumeration with the following members:

  • SingleClick: opens the hyperlink on single mouse click

  • DoubleClick: opens the hyperlink on double mouse click

  • None: the user cannot open the link.

The HyperlinkOpenArea property of the column determines whether to execute the hyperlink upon click on the cell or upon click on the text of the cell.

Appearance

The RadGridView theme could define styles for the following GridViewHyperlinkColumn cells states:

  • Default (unvisited)

  • Hovered

  • Clicked

  • Visited

The mouse cursor transforms into ‘hand’ when hovering hyperlink from the column.

Events

Here are the GridViewHyperlinkColumn specific events:

  • HyperlinkOpening: cancelable event which is raised before opening the hyperlink

  • HyperlinkOpened: event which is raised after opening the link.

See Also