Today I ran into a small problem when I needed the value inside the HyperLink column in the datagrid. You can add the HyperLink column using the Property Builder provided by the datagrid control.
To retrieve the value of the HyperLink Column you simply retrieve the value in the HyperLink object.
hyper = (HyperLink) dgi.Cells[1].Controls[0];
Here Cell[1] is the cell which contains the hyperlink column.
And finally,
hyper.Text // This will return the text of the hyperlink.
No comments:
Post a Comment