The entire code works and the bootgrid is populated by data's. I have 2 rows inside the bootgrid and when I click the checkbox, it alerts the ID.
If I put a check on the other checkbox, it also pop up the id. My problem is, how can I get all the ID if I check the check all box (TITLE)?
Once I click the check all box, it alerts an ID, but only the last one, which is the Admin. How can I get all the ID of all checked box? Here is my code.
var table = $('#user-list');
table.bootgrid({
css : {
icon : 'zmdi icon',
iconColumns : 'zmdi-view-list',
iconDown : 'zmdi-caret-down',
iconRefresh : 'zmdi-refresh',
iconUp : 'zmdi-caret-up',
},
labels : {
noResults : noResult,
loading : loadingTable,
},
ajax : true,
url : '/users/list',
selection : true,
rowCount : [10, -1],
multiSelect : true,
navigation : 2,
}).on("selected.rs.jquery.bootgrid", function(e, rows)
{
alert("Selected: " + rows[0].id);
});
Aucun commentaire:
Enregistrer un commentaire