【发布时间】:2011-07-20 08:52:06
【问题描述】:
我是 jQuery 和 ASP.Net MVC 的新手。我正在开发一个使用 jQuery 的 mvc 应用程序。
我在 jQuery 数据表中遇到问题。在更新或删除方法之后,我们需要再次重新构建数据表。我使用 jquery 完成了它,但我无法像以前那样加载数据表。请帮我解决这个问题。
<table id="ViewxxTable" width="100%"> //Here is the table I want to reconstruct
<thead>
<tr>
<th>SN No</th>
<th>Item code</th>
</tr>
</thead>
<tbody>
<%
List<InSys.Models.xxDetailClass> xxdetailLst = (List<InSys.Models.xxDetailClass>)Session["xxddetailLst"];
foreach (InSys.Models.xxDetailClass grnd in xxdetailLst)
{
%>
<tr>
<td><%= grnd.SnNo%></td>
<td><%= grnd.ItemCode%></td>
<td>
</tr>
<%
}
%>
</tbody>
</table>
jquery
oTable = $('#ViewxxTable').dataTable({
"bPaginate": false,
"bJQueryUI": true,
"bRetrieve": true,
"bDestroy": true,
"sPaginationType": "full_numbers"
});
【问题讨论】:
标签: jquery datatables