开发者

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

开发者 https://www.devze.com 2023-01-18 19:23 出处:网络
My question is, how do you access the DataNavigateUrlFormatString property in a gridhyperlinkcolumn o开发者_Go百科n a telerik radgrid programatically?

My question is, how do you access the DataNavigateUrlFormatString property in a gridhyperlinkcolumn o开发者_Go百科n 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号