key-focus event: get row/col number?
key-focus event: get row/col number?
maybe I am only stumbling over my debugger:
the event returns cell.
It looks like cell has a property 0 which is an array which somewhere in a deeper level has rowno and columnno?
I don't get it really out of there. So if I have the event, how do I know which cell/row/col-No it comes from?
My workaround is to write col/rowNo into the node (which I get in the event) as extra attributes, which works, but there must be a better way.
thanks,
Klaus
Answers
The
key-focus
event provides the cell parameter which is an API instance, meaning you can use thecell()
chained API's likecell().index()
. Look at the example in the docs for this statement:It uses
cell().index()
to get the cell's index which contains the column and row. In particular you can usecell.index().row
to get the row andcell.index().column
to get the column.Kevin
ah .. thanks. I tried cell().row().index() which didn't do what I needed. So I was close, but still wrong.
Will try this
Klaus