好的,所以我正在使用 MVCContrib 网格试图覆盖行的开头和行的结尾。它不像宣传的那样工作。我有理由确定是我在做一些愚蠢的事情。
这是我的 MVC2.0 视图的摘录。
<div id="chargestable">
<br />
<% With Html.Grid(Model.InvoiceListingInformation)
.Columns(Function(column)
column.For(Function(setColumns) setColumns.InvoiceNumber)
column.For(Function(setColumns) setColumns.InvoiceDate)
column.For(Function(setColumns) setColumns.ExclGST)
column.For(Function(setColumns) setColumns.InclGST)
End Function)
.RowStart(Function(pRowStart) "Some extra text here <tr>")
.RowEnd(Function(pRowEnd) "</tr>")
.Render()
End With
%>
</div>
这是生成的 html ......这很奇怪:
<div id="chargestable">
<br>
Some extra text here text/Some extra text here Some extra text here text/Some extra text here Some extra text here text/Some extra text here Some extra text here text/Some extra text here Some extra text here text/Some extra text here Some extra text here text/Some extra text here
<table class="grid">
<thead>
<tr><th>Invoice Number</th><th>Invoice Date</th><th>Excl G S T</th><th>Incl G S T</th></tr>
</thead>
<tbody>
<tr><td>x</td><td>13/12/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>y</td><td>15/11/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>z</td><td>13/10/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>a</td><td>13/09/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>b</td><td>13/08/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>c</td><td>12/07/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>d</td><td>13/06/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
<tr><td>e</td><td>13/05/2009 12:00:00 AM</td><td>amnt</td><td>amnt</td></tr>
</tbody>
</table>
</div>
我放在开始行和结束行函数中的东西完全呈现在网格上方。什么什么?我已经在这个问题上打了几个小时,谁能看到我做错了什么?
(PS 我不能只使用属性,因为我需要将行包装在另一个 html 元素中)
问候,詹姆斯