Skip to content
Icon

WARNING You're browsing the documentation for an upcoming version of Laravel DataTables. The documentation and features of this release are subject to change.

Html Builder Index Column

You can use addIndex api for a quick adding of column with a pre-defined sets attibutes. Add index column is mostly used for creating a column that contains a the internal index of the current record being displayed.

The default attributes of index column are:

[
'defaultContent' => '',
'data' => 'DT_RowIndex',
'name' => 'DT_RowIndex',
'title' => '',
'render' => null,
'orderable' => false,
'searchable' => false,
'exportable' => false,
'printable' => true,
'footer' => '',
];

The addIndex api should be used along with addIndexColumn of DataTables.