【发布时间】:2011-03-28 17:12:21
【问题描述】:
我目前正在试用 jqGrid 插件。一切运行良好,期望在特定列上进行排序。
我有一个正在尝试应用插件的现有表。
<script type="text/javascript">
$(document).ready(function () {
tableToGrid("#myTable", {})
});
</script>
<table id="myTable">
<thead>
<tr>
<th>
Web Site
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="http://www.jsmith.com/4093">Hello</a>
</td>
</tr>
<tr>
<td>
<a href="http://www.jsmith.com/4094">Bob</a>
</td>
</tr>
<tr>
<td>
<a href="http://www.jsmith.com/4093">Loblaws</a>
</td>
</tr>
<tr>
<td>
<a href="http://www.jsmith.com/4093">Wahoo</a>
</td>
</tr>
</tbody>
</table>
当我对列进行排序时,顺序显示为
你好,Loblaws,Wahoo,Bob
而不是
Bob,你好,Loblaws,Wahoo
看起来它是在对 href 标记进行排序,而不是对内容进行排序。
和这个问题很相似(只是插件不同)-Table sorter issue with content
【问题讨论】:
标签: c# jquery asp.net jquery-ui jqgrid