javascript - Mootools: HtmlTable really multiselect -


i have table parsed mootools htmltable class. using:

var table = new htmltable($('htmltableelement'), {  sortable: true,  parsers: ['string','number','numberlax','floatlax'],  selectable: true,  allowmultiselect: true,  shiftformultiselect: false,  classrowselected: 'selectedrow' }); table.sort(1); 

http://jsfiddle.net/lmq75/

what want is, select different rows clicking on them. it's working pretty fine 1 row , using shift -key can select more 1 row in order. how possible not deselect selected rows when clicking on row? can select e.g. 2 rows not connected?

i figured out, row can selected clicking on it, not deselected. can change behaviour first click selects row , second click deselects row?

i'm surprised of myself, found simple , easy solution, adding lines of code below table initialization:

$('htmltableelement').getelements('tbody tr').addevent('click',function(e){  e.stoppropagation();  table.togglerow(this); }); 

http://jsfiddle.net/lmq75/2/


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -