Problem with formating data grid column

I have a column with link that i want to make them clicable with some text.

When i click the grid, then columns, and select the colum in the template section i write this:

" < a href="@(data.nameofcolumn)"> link text "

All is good, but the link is redirecting to http://localhost:5000/data.nameofcolumn. Is there a way to be directly to nameofcolumn? am i doing something wrong?

Hi Stefan,

Not sure I understood your question however here is an example how to search google for a city from Northwind Employees:

<RadzenGridColumn TItem="Employee" Property="City" Title="City">
   <Template Context="data">
       <a href="@($"{data.City}")">@data.City</a>

Yes, but when i put @data.City in my href it load localhoast:5000/data.City, not just In that case if i put @data.City as, then when i click the link it redirects me to localhoast:5000/, not

I see. The link href is relative to the application root if you have not specified schema for your url. You need: <a href="">Go to Google</a>

<a href="">Go to Google</a> will not work since the browser will assume that this is link relative to the current root.

1 Like

Yes, this was the problem. Thank you very much.
So now i have put < a href="http://@(data.Link)">Link and its all good. Maybe change of documentation, or did i just missed that somewhere ?