Flutter PaginatedDataTable: how to show checkbox column?

178 views Asked by At

How to show the checkbox column?

 PaginatedDataTable(
    showCheckboxColumn: true,
    columns: _columns,
    source: _dataTableSource,
  ),

There is no checkbox column.

1

There are 1 answers

0
Zhentao On BEST ANSWER

According to the document

showCheckboxColumn → bool Whether the widget should display checkboxes for selectable rows.

so your DataRow must be selectable if you want to show the checkbox column, add onSelectChanged to the DataRow

     DataRow(
       cells: <DataCell>[ ],
       onSelectChanged: (selected) {}
      );