1

以下を使用して、グリッドのヘッダー行に「すべて選択」チェックボックスをレンダリングしようとしています。

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");

ただし、これは期待どおりにレンダリングされず、代わり<a>にコンテンツとしてレンダリングされます

<tr><th class="text-error"><a href="/Invoices?Direction=Ascending"></a></th>

「行」チェックボックスは正しくレンダリングされ、すでにこのソリューションを試してみましたが、これが現在使用している Nuget パッケージに適用できるかどうかはわかりません - MvcContrib.Mvc3-ci 3.0.100

4

1 に答える 1