我正在使用 bootgrid-basic 来显示我的数据,
<table id="grid-basic"
class="table table-bordered table-striped table-condensed mb-none">
<thead>
<th data-column-id="aa">aa</th>
<th data-column-id="ss" data-order="desc">ss</th>
<th data-column-id="dd">dd</th>
<th data-column-id="ff">ff</th>
<th data-column-id="aaa">aaa</th>
<th data-column-id="aaaaa" >aaaAa</th>
</tr>
</thead>
<tbody>
@foreach($alldata as $data)
<tr>
<td>{{$data->aa}}</td>
<td><a href="#">{{$data->ss}}</a></td>
<td>0</td>
<td>{{$data->dd}}</td>
<td>{{$data->ff}}</td>
<td><a href="#">ASSSsdf</a></td>
</tr>
@endforeach
</tbody>
</table>
$("#grid-basic").bootgrid();
并在脚本中初始化。
一切都工作正常,如搜索、数据排序、分页,但这些链接不起作用。
如果我使用格式化程序链接工作,其余的不起作用。
$("#grid-basic").bootgrid(
formatters: {
"action": function (column, row)
{
return '<a href=\"/model/' + row.actions + '"\>' +row.actions+ '</a>' ;
}});
这里有一个 jsfiddle 链接:http: //jsfiddle.net/6xpyxbcg/