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

Custom bound/unbound columns with HTML

1 Answer 329 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 03 Apr 2019, 07:56 AM

Hey,

 

so what i would like to achieve is to simply add a column to the grid, which has a button in it acting as a link. However the link needs 3 parameters to be passed to the url, which i need to take from the data source. How can i achieve that?

Used to do it like this within a table:

 

<a class="btn btn-light border" role="button" asp-controller="X" asp-action="Create" asp-route-id="@j.Name" asp-route-jId="@j.JId" asp-route-mId="j.MId">Open</a>

 

Thank you!

 

Regards,

Peter

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 08 Apr 2019, 07:33 AM
Hello Peter,

In order to add a hyperlink with parameters in a Grid I would suggest using a ClientTemplate for the column. Check out the article below that illustrates the approach. The second part about ClientTemplate is applicable for .NET Core project.




Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or