2

Bootgrid を使用してテーブルにデータを表示しています: http://www.jquery-bootgrid.com/

を に設定するrowSelecttrue、チェックボックスをオンにしても行を選択できません。

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: {},
    });

チェックボックスがチェックされているときに行を選択したい。

4

1 に答える 1