How to create a hyperlink in a column in telerik grid

teleriktelerik-gridtelerik-mvc

I have a grid which contains an id,which is a hyperlink and takes me to a different page.Can anyone help me to achieve this.

Thanks

Best Solution

Assuming that the user is working on Telerik-MVC. Here's a sample code.

 Html.Telerik().Grid(Model)
    .Name("GridName")
    .DataKeys(keys => keys.Add(k => k.Id))
    .Columns(columns =>
    {
        columns.Bound(c => c.Id).Title("ID")
            .Template(@<text><a href="http://differentpage?id=@item.RpoId">@item.RpoId</a> </text>);
            columns.Bound(c => c.PropertyA);
            columns.Bound(c => c.PropertyB); //And so on...
        }

    )
    .Render();

Have a closer look at how the column is Templated.

Related Question