我有一张带发票清单的模型。我在网格中显示这张发票清单。我想在网格中有一列复选框,以便我可以执行一些额外的逻辑。我发布时如何阅读这些复选框的值?基本上我需要的是在列的每个项目的列中都有一个Html.CheckBoxFor
。我不认为这是可能的,但有没有办法有类似的东西?
这是我的网格:
<% Html.Grid(Model.Invoices)
.Attributes(@id => "tblInvoiceSearchResults", @class => "tablesorter", style => "width:100%")
.Empty("No invoice exist with that criteria")
.Columns(
col =>
{
col.For(c => c.InvoiceNumber).Named("Invoice Number");
col.For(c => c.InvoicePurchaseOrderNumber).Named("PurchaseOrder");
col.For(c => c.InvoiceStatus).Named("Invoice Status");
col.For(c => c.OpenAmount.ToMoneyDisplay()).Visible((bool)ViewData["canSeePricing"])
.Named("Open Amt").Attributes(align=>"right");
col.For(c => c.OriginalAmount.ToMoneyDisplay()).Visible((bool)ViewData["canSeePricing"])
.Named("Original Amt")
.Attributes(align => "right");
col.For(c => c.InvoiceDate).Named("Invoice Date");
}).Render();
%>