protected void btnAccessCellHyperlink_Click(object sender, EventArgs e)
{
// ExStart:AccessHyperlink
// Access first worksheet of gridweb and cell A1
GridWorksheet sheet = GridWeb1.WorkSheets[0];
GridCell cellA1 = sheet.Cells["A1"];
// Access hyperlink of cell A1 if it contains any
GridHyperlink cellHyperlink = sheet.Hyperlinks.GetHyperlink(cellA1);
if (cellHyperlink == null)
{
Label1.Text = "Cell A1 does not have any hyperlink";
}
else
{
// Access hyperlink properties e.g. address
string hyperlinkAddress = cellHyperlink.Address;
Label1.Text = "Address of hyperlink in cell A1 :" + hyperlinkAddress;
}
// ExEnd:AccessHyperlink
}
}