Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can footers be added to MVCContrib grids?

I'd like for my column header to also be footers using MVCContrib grid. How can I add footers?

<% Html.Grid(Model).Columns(col =>
{
col.For(c => c.sub_id).Named("Id");
col.For(c => c.name).Named("Name");
col.For(c => c.group).Named("Group");
col.For(c => c.insurance_GL).Named("Insurance").Format("{0:d}");
}).Attributes(id => "list").Render(); %>
like image 680
RememberME Avatar asked Feb 25 '10 21:02

RememberME


1 Answers

Out of the box there’s no built in way to do this, but there are some extensibility points you can hook into if you want to add this functionality.

If you create a custom GridRenderer that inherits from HtmlTableGridRender then you could override the RenderGridEnd method and generate the appropriate HTML in there. - Jeremey Skinner

From comments in http://www.jeremyskinner.co.uk/2009/03/01/mvccontrib-grid-part-5-the-action-syntax/

like image 172
Kevin LaBranche Avatar answered Sep 21 '22 12:09

Kevin LaBranche