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

Client template (hyper link) on Foreign Key column

5 Answers 965 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nirav
Top achievements
Rank 1
Nirav asked on 09 Apr 2013, 09:56 AM
Hi,

I want to apply hyperlink on foreign key column.
I am having a products foreign key column in my grid. During add/edit popup mode user can select the product from dropdown list. Once user adds the data I am displaying product name in my grid.

Now I want to display the product name as a link and clicking on it, user should navigate to product details page.

Thanks,
Nirav

5 Answers, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 11 Apr 2013, 06:55 AM
Hi Nirav,

 
Basically in the client template only the value of the column is available and you should manually match the text for that value to show it in the hyper link. For convenience I created small example about how to achieve the desired behavior using custom code and attached it to the current thread.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nirav
Top achievements
Rank 1
answered on 12 Apr 2013, 06:26 AM
Hi Vladimir,

Your example worked like a charmed. This is what I needed and thanks for providing the same.

Regards,
Nirav
0
Amitkumar
Top achievements
Rank 1
answered on 10 Apr 2014, 01:26 PM
Hi Vladimir,

I need one simple hyperlink column which is simple coming from database....

How can achieve that? Here is my code and Grid attachment.


columns.Bound(Docs =>Docs.docid );
columns.Bound(Docs => Docs.filename);
columns.Bound(Docs => Docs.SvcUrl); //This column I wanted to make it hyperlink will open in new window.


0
Vladimir Iliev
Telerik team
answered on 14 Apr 2014, 10:24 AM
Hi,

Please check the example below of creating a link from the "SvcUrl" property:

columns.Bound(Docs => Docs.SvcUrl)
    .ClientTemplate(" <a href='#=SvcUrl#' target='_blank'>Click Here</a> ");

Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Amitkumar
Top achievements
Rank 1
answered on 15 Apr 2014, 07:37 PM
Can you please delete the hyperlink image? Thanks,
Tags
Grid
Asked by
Nirav
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Nirav
Top achievements
Rank 1
Amitkumar
Top achievements
Rank 1
Share this question
or