!{Html.Grid(Model.Results)
.Columns(column =>
{
column.For(x => x.Title).Named("Article Name");
column.For(x => x.Sites);
column.For(x => x.PreviousPath).Named("Previous Path");
column.For(x => x.CurrentPath).Named("Current Path");
column.For(x => x.PreviousUrl).Named("Previous Url");
column.For(x => x.CurrentUrl).Named("Current Url");
column.For(x => x.LogDate).Named("Date");
}
)
.Empty("There are no R301s.")
}
In the above grid I have a CurrentUrl. This URL is pointing to a website. I need to make the Current URL a hyperlink to the same Url.
On the page I have added
use namespace="MvcContrib.UI.Grid.ActionSyntax"
There is an Action syntax to add hyperlink. I think the code will look something like
column.For(x => x.CurrentUrl).Named("Current Url").Action(href)
Need help with the syntax to add hyperlink to the above column.
Unless you want to use ActionSyntax, you can create the Html.ActionLink independently assuming you know what values are coming in for your href.
If href is an actual URL (http://www.example.com), standard HTML works with Spark:
If you're building your URL based on a set Action name and Id (such as directing to an edit page):