Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82198

checkBox with DataTable row Selection

$
0
0

Hi All,
I am struggling in introducing checkbox selection with angular data table. So I came across this example

https://datatables.net/extensions/select/examples/initialisation/checkbox

I want to know how I incorporate the above mentioned example when my column definition is not as simple as in the example.
I am defining my columns using DTColumnBuilder
****Following is the sample****
```$scope.dtColumnDefs = [

        DTColumnBuilder.newColumn(null).withClass().withTitle(name) .renderWith(function(data, type, full) {

       }),


        DTColumnBuilder.newColumn('template').withClass().withTitle(position).renderWith(function (data, type, full) {

        }),

        DTColumnBuilder.newColumn(null').withTitle(Age).renderWith(function (data, type, full) {

        }),

];```

And My index file look like this.

``` <div class="md-card uk-margin-medium-bottom" >
<div class="md-card-content" ng-controller="dt_individual_search as showCase">
<table id="table"

                   cellspacing="0"
                   datatable
                   dt-options="dtOptions"
                   dt-columns="dtColumnDefs"
                   dt-row-selection="2"
                   disable-buttons="[1]"
                   width="100%">
                <thead>
                <tr>
                 <th></th>
                <th>Name</th>
                <th>Position</th>
                <th>Office</th>
                <th>Age</th>
                <th>Salary</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>```

So my question is now How I can include the className: 'select-checkbox', in my current codewith DTColumnBuilder?


Viewing all articles
Browse latest Browse all 82198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>