views:

56

answers:

1

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.

+1  A: 

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.

Dick Lampard
Fantastic! Cheers! I tried looking this up on telerik's own user guide and demos but their documentation is so vague sometimes.
David Swindells