Bchir Med Amine
Bchir Med Amine

Reputation: 88

bootgrid jquery select row

I'm using Bootgrid jquery in my asp.net mvc , and i'm trying to make row selectable , i tried what i found on the net but it still not working , it shows up without the selection feature

<table class="table  table-condensed table-hover table-striped col-md-12" id="tbl-Produits">
    <thead>
        <tr>

            <td data-column-id="Nom">Nom du Produit</td>
            <td data-column-id="Type"> Type du Produit</td>

            <td data-column-id="LastVersion">Dernière version </td>
            </tr>
    </thead>
    <tbody></tbody>
</table>

<script type="text/javascript">
    $(document).ready(function () {
        var ProduitsGrid = $("#tbl-Produits").bootgrid({
            ajax: true,
            selection: true,
            multiSelect: false,
            rowSelect: true,
            url: "@Url.Action("getall")",.....

Upvotes: 0

Views: 1300

Answers (1)

Iztoksson
Iztoksson

Reputation: 990

You need to have a data-identifier="true" set for one column. As the documentation says:

Ensure that the data attribute data-identifier="true" is set on one column header.

See here

Upvotes: 2

Related Questions