ItemsView.HyperlinkClick Event
Occurs when a user clicks a URL in an HTML template and allows you to manually handle the event.
Namespace: DevExpress.XtraGrid.Views.Items
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Event Data
The HyperlinkClick event's data class is ColumnViewHyperlinkClickEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Bubbles |
Returns whether this element can pass an event up along the tree, to its parent HTML elements. You can enable the Cancel |
Cancel |
Specifies whether this element should pass an event to its parent elements. See any “Html |
Current |
Inherited from Dx |
Element |
Inherited from Dx |
Element |
Returns the unique identifier of an HTML element. Element IDs are set in HTML markup (the “id” property). See any “Html |
Node |
Inherited from Dx |
Root |
Inherited from Dx |
Row |
Gets an item’s handle. |
Suppress |
Specifies whether a control whose HTML element triggered this event should raise its own related event. See any “Html |
Tag |
Inherited from Dx |
Target |
Inherited from Dx |
The event data class exposes the following methods:
Method |
---|
Has |
Has |
Has |
#Remarks
Handle the HyperlinkClick
event to manually process user clicks on an <a> tag in an HTML template. Use the e.Href
property to obtain the <a> tag’s href
attribute. The e.RowHandle property identifies an item whose link was clicked.
Set the e.Handled
property to true to cancel the default action.
using DevExpress.XtraGrid.Views.Base;
private void itemsView1_HyperlinkClick(object sender, ColumnViewHyperlinkClickEventArgs e) {
e.Handled = !e.Href.Contains("devexpress.com");
}