The WebGrid class in needs to have a 'GridPath' parameter that would allow an MVC developer to specify an alternative to using the HttpRequest.Path. This is helpful when using the WebGrid inside a child action view (see MVC's Html.Action or Html.RenderAction extension methods in the System.Web.Mvc.Html.ChildActionExtensions class) and ajax situations where you want to specify a different controller action to handle paging.
Without being to manually specify a path for the grid's links advanced uses of MVC controller actions are not possible without having to parse the the html rendered by the WebGrid itself. At present the class is not designed in such a way as to inject this functionality thru a subclass.
Comments: Thanks for reporting this. We looked into your suggestion and we realized that the WebGrid helper was never designed with MVC in mind. It’s a great helper if you want a quick little grid but it leaves a lot to be desired. Since we don't actually plan to expand it to fully support MVC we feel it's better to be used for Simple & Web Pages scenarios.
Without being to manually specify a path for the grid's links advanced uses of MVC controller actions are not possible without having to parse the the html rendered by the WebGrid itself. At present the class is not designed in such a way as to inject this functionality thru a subclass.
Comments: Thanks for reporting this. We looked into your suggestion and we realized that the WebGrid helper was never designed with MVC in mind. It’s a great helper if you want a quick little grid but it leaves a lot to be desired. Since we don't actually plan to expand it to fully support MVC we feel it's better to be used for Simple & Web Pages scenarios.