2

I am using Bootgrid to display data in tables: http://www.jquery-bootgrid.com/

When I set the rowSelect to true, I can't select the row when I check the checkbox:

I have created a 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>

And this is the JavaScript:

    var dt = $('#employeeList').bootgrid({
      selection: true,
      rowSelect: true,
      converters: {},
    });

I want to select the Row when the checkbox is checked.

Dawood Awan
  • 7,051
  • 10
  • 56
  • 119
  • 1
    It's looks like some kind of bootgrid bug, because then you add `multiSelect: true` to options it works fine. – Gvidas Dec 17 '15 at 07:46

1 Answers1

0

You must use:

var dt = $('#employeeList').bootgrid({
      selection: true,
      rowSelect: true,
      converters: {},
    }).on("selected.rs.jquery.bootgrid", function(e, rows) {
 
    alert("Its Working");
}));

You got a few examples over here: http://www.jquery-bootgrid.com/examples

10 Rep
  • 2,217
  • 7
  • 19
  • 33