This is a migrated thread and some comments may be shown as answers.

[Solved] Setting the url of the linkbutton with the row id

2 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vishesh kumar
Top achievements
Rank 1
vishesh kumar asked on 18 Feb 2010, 11:23 AM
Hi,
I need to set the DataNavigateUrlFormatString of the GridHyperLinkColumn to some thing like this.
http://xyz.com?id=rownumber.

Here rownumber is the number of the row in which the linkbutton will be there.

Eg: for a linkbutton in the third row,

the url should be like http://xyz.com?id=3.

How can this be achieved in the ascx file?( or even via code?)

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 Feb 2010, 12:11 PM
Hello Vishesh Kumar,

Set the DataNavigateUrlFormatString property and DataNavigateUrlFields accordingly in order to pass value as url parameter.

aspx:
 
<telerik:GridHyperLinkColumn DataTextField="Name" UniqueName="Link" DataNavigateUrlFields="id" DataNavigateUrlFormatString="Export.aspx?id={0}">  
</telerik:GridHyperLinkColumn>  

Thanks,
Princy.
0
vishesh kumar
Top achievements
Rank 1
answered on 18 Feb 2010, 01:29 PM
Hi,

I need to pass the holding row of the linkbutton as the parameter. I dont think that just passing the id parameter will work.

Any ideas?
Tags
Grid
Asked by
vishesh kumar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
vishesh kumar
Top achievements
Rank 1
Share this question
or