David Swindells
David Swindells

Reputation: 651

How to access the DataNavigateUrlFormatString in a gridhyperlinkcolumn on a telerik radgrid programatically

My question is, how do you access the DataNavigateUrlFormatString property in a gridhyperlinkcolumn on a telerik radgrid programatically?

At the moment i can access the text displayed through the cells in the master table view like so,

string filename = myRadGrid.MasterTableView.Items[e.Item.ItemIndex].Cells[12].Text;

but on a gridhyperlinkcolumn that only shows " ", i'd like to get at the actual link but i'm not sure how. I think it would involve casting to a hyperlink cell but i don't think one exists.

Thanks in advance for your help.

Upvotes: 0

Views: 2553

Answers (1)

Dick Lampard
Dick Lampard

Reputation: 2266

Try with this line of code:

string filename = myRadGrid.MasterTableView.Items[e.Item.ItemIndex][""]Controls[0] as HyperLink).Text;

where MyHyperLinkColumnUniqueName is the actual UniqueName value for the column in question.

Upvotes: 1

Related Questions