I have a webgrid with a date column. The date should appear as a link, plus the column should be sortable too.
If I add the date column like below, the column header "Order Date" is coming up as plain text.
grid.Column(
header: "Order Date",
format: (item) => new HtmlString(Html.ActionLink((string)item.orderdate...)
)
If I add the date column without the actionlink, the column header "Order Date" comes up as a link, and I am able to click to sort it.
grid.Column("orderdate", header: "Order Date")
What am I doing wrong? How can I have the column header clickable/sortable and have the date field as a link?
Thanks.