This question is locked. New answers and comments are not allowed.
Hello,
I'm trying to use GridRouteValues but it is returning null. In my grid, I've created a templated column with a button to an action on my controller -
columns.Template(o =>
{
%>
<a href="<%: Url.Action("Details", "Requisition", new { id = o.RequisitionID }) %>" class = "viewLink" title="Details"><img src="<%= Url.Content("~/Content/Images/magnifier.png") %>" alt="Details" /></a>
<%
}).Title(
"View").Width(50);
In the controller, I'm using -
RouteValueDictionary
routeValues = this.GridRouteValues();
However, routeValues is always null. Is this because I'm using a columns.Template instead of a columns.Command button?
Essentially, what I'm trying to do is to use separate views for editing and displaying items, and provide a "Back to the List" button which will return to the grid along with its route values.
Thank you,
-Tony