将页脚行添加到grid.mvc

问题描述 投票:0回答:1

我想添加页脚行,以便用户可以在此图像上添加新项目。image of footer我正在使用Vyacheslav Bukharin的gid.MVC。如您在本教程中所见https://www.c-sharpcorner.com/UploadFile/4d9083/creating-simple-grid-in-mvc-using-grid-mvc/

到目前为止是我的代码

@Html.Grid(Model).Columns(columns =>
                {
                    columns.Add(c => c.cliente_id).Titled("Cliente ID");
                    columns.Add(c => c.nombre_cliente).Titled("Cliente name");
                    columns.Add()
                    .Filterable(false)
                    .Encoded(false)
                    .Sanitized(false)
                    .SetWidth(30)
                    .RenderValueAs(o => Html.ActionLink("Edit", "Edit", new { id = o.cliente_id }));
                    columns.Add()
                    .Encoded(false)
                    .Sanitized(false)
                    .SetWidth(30)
                    .RenderValueAs(o => Html.ActionLink("Delete", "Delete", new { id = o.cliente_id }));                        
                    }).WithPaging(10).Sortable(true).Filterable(true).WithMultipleFilters()

我的问题是如何在mvc中添加与图像相同的页脚。谢谢您的帮助

asp.net-mvc grid.mvc
1个回答
0
投票

将gridmvc.css包含到您的layout.cshtml中。过滤和分页将开始工作。

<link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" 
type="text/css" />
© www.soinside.com 2019 - 2024. All rights reserved.