In editor event callback function, how to get the current editing colomns
In editor event callback function, how to get the current editing colomns
When I use editor event callback function, if i want to get the current column and row index that is current edited, how can i get that? thanks.Below is the code.
detailEditor.on('setData', function(e, json,data, action){
//here how can i get the current column and row index that is current edited
return ;
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use the
modifier()
method to get whatever element triggered the edit (probably the cell node in this case). You can then usecell().index()
with the cell.Allan
thanks for answer,
but use modifier i can only get the row index, i still can't get column index,here is the explanation in api documnet
The modifier will give whatever you started the editing with - so if it was
editor.inline( myTdCell )
modifier would give you backmyTdCell
.Can you give me a link to the page you are working on so I can see what is happening please?
Allan
js code is like this
Hi,
Thanks for your code - this I think looks like a bug in the current version of Editor. I'm currently rewriting that part for the next version, so I will ensure that this is addressed. However, what you could do in the mean time is just save the cell in a variable:
Allan
hello, about this question ,within the new version, how i can get the column now editing?
thanks
Using the code you had above. You just need to access the
column
property of the index that you get from the cell.Allan