Can footers be added to MVCContrib grids?
-
22-09-2019 - |
문제
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(); %>
해결책
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/
제휴하지 않습니다 StackOverflow