Can footers be added to MVCContrib grids?
Asked Answered
A

1

6

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(); %>
Abshire answered 25/2, 2010 at 21:42 Comment(0)
B
8

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/

Breviary answered 26/2, 2010 at 1:37 Comment(1)
Thank you. I actually looked at that page, but didn't go through the comments.Abshire

© 2022 - 2024 — McMap. All rights reserved.