Search code examples
javascriptjqueryhandsontable

Knowing which column is being updated


I am trying to get handsontable to give me which column is being updated, but have not been able to find a proper solution. I understand they are using a textarea to get the input and then putting the values into a table, but I just cannot figure out how to find out which column is being update.

Any help would be appreciated.

Thanks


Solution

  • This method will tell you what row/column is selected:

    $('#example1grid').handsontable('getSelected')
    

    This will be return the same coordinates as the currently edited cell, except for cases when there are multiple cells selected (but even then the currenyly edited cell is always within selected cells).

    I am thinking about creating a new method getCurrent or callback onBeginEditing to return currently edited cell. Which would be better for you? I think the callback would be better.