views:

169

answers:

2

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(); %>
+3  A: 

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/

klabranche
Thank you. I actually looked at that page, but didn't go through the comments.
RememberME
A: 

Could you post some example how to do that - it would be very helpful.

Zarko