Skip to content

Select checkboxes on page load - server-side #62

@leoaccorsi

Description

@leoaccorsi

Is there a way to set selected checkboxes server-side?

I did this:

var initialList = ['2847', '3341'];

'createdCell': function (td, cellData, rowData, rowIndex, colIndex) { if ((initialList.indexOf(rowData[0]) !== -1)) { this.api().cell(td).checkboxes.select(); } }

But this code just select when i enter on checkboxes page.

If the checkboxes to be selected is on 2nd page, datatable will show 0 selected rows, and when i navigate to 2nd page, it shows me 1 row selected.

There is a way to fix this?

I also tried table.column(0).checkboxes.select() but it select all rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions