How to manually initialize the jquery "selectable" plugin

Asked

Viewed 18 times

0

The selection of the Rows from my datatables works perfectly (just click on the cells they are tarnished gray) when I use data-plugin="selectable" data-Row-selectable="true" directly in the html of them. Thus, plugins are automatically initialized.

When I use the datatable inside a bootstrap modal window, I choose the Layout property of the form for Null (I can’t change that - Asp.net Core MVC project) and that seems to be causing all plugins to not be initialized. Whenever I have a particular plugin, I start it using Jquery, but I don’t know how to do it with selectable. Does anyone know how to help me?

<div class="panel panel-default">
    <table id="dtFinanceiroParcela" class="table table-striped table-bordered center-header table-vcenter table-responsive-lg" data-plugin="selectable" data-row-selectable="true" cellspacing="0" width="100%">
        <thead class="bg-blue-grey-100">
            <tr>
                <th>
                    <span class="checkbox-custom checkbox-default">
                        <input class="selectable-all" type="checkbox">
                        <label></label>
                    </span>
                </th>
                <th>
                    Parcela
                </th>
                <th>
                    Data de Emissão
                </th>
                <th>
                    Data de Vencimento
                </th>
                <th>
                    Valor da Parcela
                </th>
                <th>
                    Situação
                </th>
                <th>
                    Ações
                </th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
</div>

Datatable example that works the selection:

inserir a descrição da imagem aqui

Datatable example that does not work selection:

inserir a descrição da imagem aqui

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.