Handsontable coloring cells using button -


i want allow user color selected cells clicking button (say, red, green , blue buttons).

to selected cells found code:

$('div#example1').handsontable(options);  //get instance using jquery wrapper var ht = $('#example1').handsontable('getinstance');  //return index of selected cells array [startrow, startcol, endrow, endcol] var sel = ht.getselected();  //'alert' index of starting row of selection alert(sel[0]); 

but can't run code when clicking button, because selection "disappear" after clicking , before function starts run.

i try following this instruction need workaround issue.

please add outsideclickdeselects: false, options in constructor , can perform 'ht.getselected()' method.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -