我正在使用Bootgrid在表格中显示数据:http://www.jquery-bootgrid.com/
当我将rowSelect
设置为true
时,当我勾选复选框时,我无法选择该行:
我创建了一个JSFiddle:https://jsfiddle.net/n2jqjtep/1/
<table id="employeeList" class="table table-bordered">
<thead>
<tr>
<th data-column-id="iEmployeeId" data-type="numeric" data-visible="false" data-identifier="true">Id</th>
<th data-column-id="sName">Name</th>
<th data-column-id="sAddress">Address</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>dsa</td>
<td>asd</td>
</tr>
<tr>
<td>2</td>
<td>sss</td>
<td>assd</td>
</tr>
</tbody>
</table>
这是JavaScript:
var dt = $('#employeeList').bootgrid({
selection: true,
rowSelect: true,
converters: {},
});
我想在选中复选框时选择行。
答案 0 :(得分:0)
您必须使用:
var dt = $('#employeeList').bootgrid({
selection: true,
rowSelect: true,
converters: {},
}).on("selected.rs.jquery.bootgrid", function(e, rows) {
alert("Its Working");
}));
您在这里有一些示例: http://www.jquery-bootgrid.com/examples