Hello guys I am using backgrid to render my table which by chance also have some checkboxes. Now I want to add 2 attributes to those checkboxes but I can't figure out how to do it. Can somebody tell me how can I accomplish it. Thanks
HTML
<div id="dayResult" class="backgrid-container" style="width: 139PX; height: initial; "></div>
JS
var grid1 = new Backgrid.Grid({
columns: [ {
name: "name",
label: "",
cell: "string"
},{
// name is a required parameter, but you don't really want one on a select all column
name: " ",
// Backgrid.Extension.SelectRowCell lets you select individual rows
cell: "select-row",
// Backgrid.Extension.SelectAllHeaderCell lets you select all the row on a page
// headerCell: "select-all",
}],
collection: new Backbone.Collection([
{"name": "Monday"},
{"name": "Tuesday"},
{"name": "Wednesday"},
{"name": "Thursday"},
{"name": "Friday"},
{"name": "Saturday"},
{"name": "Sunday"}
])
});
$("#dayResult").append(grid1.render().el);
Files that are being included for this
CSS
<link href="../assets/css/backgrid.css" rel="stylesheet" />
<link href="../assets/plugins/backgrid-selectall/css/backgrid-select-all.css" rel="stylesheet" />
<link href="../assets/plugins/switchery/switchery.min.css" rel="stylesheet" />
JS
<script src="https://cdn.rawgit.com/jashkenas/underscore/1.5.2/underscore.js"></script>
<script src="https://cdn.rawgit.com/jashkenas/backbone/1.1.0/backbone.js"></script>
<script src="https://cdn.rawgit.com/wyuenho/backbone-pageable/master/lib/backbone-pageable.js"></script>
<script src="https://cdn.rawgit.com/wyuenho/backgrid/master/lib/backgrid.js"></script>
<script src="./assets/plugins/backgrid-selectall/js/backgrid-select-all.js" ></script>
<script src="./assets/plugins/switchery/switchery.js"></script>
CDN URL's
Switchery
https://cdn.rawgit.com/abpetkov/switchery/master/switchery.css
https://cdn.rawgit.com/abpetkov/switchery/master/switchery.js
Backgrid
https://cdn.rawgit.com/wyuenho/backgrid/master/lib/backgrid.css
https://cdn.rawgit.com/wyuenho/backgrid-select-all/master/backgrid-select-all.css
https://cdn.rawgit.com/wyuenho/backgrid/master/lib/backgrid.js
https://cdn.rawgit.com/wyuenho/backgrid-select-all/master/backgrid-select-all.js