how to add pre-selected rows into select.info ?
how to add pre-selected rows into select.info ?
I use "createRow" callback to select a row:
"createdRow": function( row, data, dataIndex ) {
if ( data.quantity > 0 ) {
$(row).addClass('selected');
$(row).select();
}
},
it all works fine, except one thing: the select.info at left-bottom, which usually indicates how many row selected, doesn't add those pre-selected rows.
when I click a row afterwards, the select.info shows: "1 row selected". (I've set select to be multiple).
is there anyway that I can manually change the select.info's value?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
Answers
Don't use jQuery / DOM to select the rows, use the
row().select()
method. i.e. in this case simply havetable.row( row ).select();
Allan
Thank you very much.