private LinkLabelCell CreateAddressLinkLabelCell()
{
LinkLabelCell linkLabelCell = new LinkLabelCell();
linkLabelCell.Selectable = false;
linkLabelCell.Name = "Address";
// Customize behavior of link label.
linkLabelCell.LinkBehavior = LinkBehavior.HoverUnderline;
// Customize colors when link label in different status.
linkLabelCell.LinkColor = Color.Blue;
linkLabelCell.ActiveLinkColor = Color.Red;
linkLabelCell.VisitedLinkColor = Color.Purple;
return linkLabelCell;
}
void gcMultiRow1_CellClick(object sender, CellEventArgs e)
{
if (e.CellName == "Address")
{
object value = gcMultiRow1[e.RowIndex, e.CellIndex].Value;
if (value != null)
{
Process.Start(value.ToString());
}
}
}
Private Function CreateAddressLinkLabelCell() As LinkLabelCell
Dim linkLabelCell As New LinkLabelCell()
linkLabelCell.Selectable = False
linkLabelCell.Name = "Address"
' Customize behavior of link label.
linkLabelCell.LinkBehavior = LinkBehavior.HoverUnderline
' Customize colors when link label in different status.
linkLabelCell.LinkColor = Color.Blue
linkLabelCell.ActiveLinkColor = Color.Red
linkLabelCell.VisitedLinkColor = Color.Purple
Return linkLabelCell
End Function
Private Sub gcMultiRow1_CellClick(ByVal sender As Object, ByVal e As CellEventArgs) Handles gcMultiRow1.CellClick
If e.CellName = "Address" Then
Dim value As Object = gcMultiRow1(e.RowIndex, e.CellIndex).Value
If value <> Nothing Then
Process.Start(value.ToString())
End If
End If
End Sub