我正在尝试使用以下内容在网格的标题行中呈现“全选”复选框。
column.For(x => Html.CheckBox("InvoiceSelection", false, new {@class = "checkbox reqPayment ", value = x.InvoiceId}))
.Header(o=>"<th><input type=\"checkbox\" id='chkHeader' />Select All</th>")
.Encode(false)
.HeaderAttributes(@class => "text-error");
但是,这并没有按预期呈现,而是以 an<a>
作为内容呈现
<tr><th class="text-error"><a href="/Invoices?Direction=Ascending"></a></th>
“行”复选框正确呈现并且已经尝试过这个解决方案但没有运气但不确定这是否适用于我目前使用的 Nuget 包 - MvcContrib.Mvc3-ci 3.0.100