This is a migrated thread and some comments may be shown as answers.

[Solved] Problem with GridRouteValues()

1 Answer 168 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tony Herring
Top achievements
Rank 1
Tony Herring asked on 07 Oct 2010, 05:39 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Tony Herring
Top achievements
Rank 1
answered on 07 Oct 2010, 07:32 PM
I haven't tried this yet, but it looks like it may work for me. --

http://www.telerik.com/community/forums/aspnet-mvc/grid/supporting-quot-back-quot-functionality.aspx

-Tony

Tags
Grid
Asked by
Tony Herring
Top achievements
Rank 1
Answers by
Tony Herring
Top achievements
Rank 1
Share this question
or