Brian,
Yes, it is free.
You can access it via: $('#example').data('handsontable').getSelected()
How do you want to use it?
The most basic way to get at it
HBS=: 0 : 0
.... <snip>
'<button type="button" id="getselected">get selected</button>'
...
'<div id="dialog" title="Table Editor Error"></div>'
)
function ev_body_load()
{
document.title= window.name;
$(function(){$("#dialog").dialog({autoOpen:false,modal:true});});
bindenter();
bindsave();
// start new
$(function() {$('#getselected').click(function() {
alert($('#example').data('handsontable').getSelected()) }); });
// end new
jdoajax([]);
}
NOTE: you also need to set the outsideClickDeselects property
otherwise it will lose the selection on click -
https://github.com/handsontable/handsontable/issues/125
$('#example').handsontable({
data: data,
minSpareRows: 1,
minSpareCols: 1,
colHeaders: true,
rowHeaders: true,
contextMenu: true,
type: sf,
undo: true,
outsideClickDeselects: false //NEW
});
On Tue, Nov 15, 2016 at 6:13 PM, Brian Schott <[email protected]> wrote:
> Joe, et al,
>
> While I have been pondering your excellent code, I found
> j64-805/addons/ide/jhs/jtable.ijs which does most of the same things and is
> based on handsontable/jquery. I suspect that it would be better to use
> jtable.ijs than to use jquerydemo.ijs if I can somehow find or generate the
> equivalent of `selectedCoordinates` in that code and if the various needed
> other features are available for free.
>
> I have found that getSelected() gives virtually the same result as
> selectedCoordinates at the following link and I have 2 questions (at
> least). Is getSelected() free, and if so, how can it be accessed in
> jtable.ijs?
>
> https://docs.handsontable.com/pro/1.8.0/Core.html#getSelected
>
> On Thu, Nov 10, 2016 at 11:23 AM, Joe Bogner <[email protected]> wrote:
>
>> I've updated the demo to post the data to the server:
>> http://209.177.92.233/jquerydemo
>>
>> code is updated: https://gist.github.com/joebo/
>> 556b9987f629eef306799fef47f2818d
>>
>> It works by having a button on the form which can be invoked manually
>> or will be automatically invoked when the mouseup event happens. The
>> button can be hidden using a checkbox to illustrate that the
>> functionality works without the button being visible
>>
>> Hope this helps!
>>
>> Joe
>>
>>
>>
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm