Editor won't delete (remove) row on second try
Editor won't delete (remove) row on second try
Igorski88
Posts: 25Questions: 8Answers: 0
I am using a jquery context menu to delete a row. It works the first time but the second time I do it it fails.
Code to remove the Row:
editor
.title('Delete Selected?')
.buttons('Confirm delete')
.message('Are you sure you want to delete?')
.remove(rowIndex)
On the first try. I do see the client sending the proper Json to the server on the second try the Json data is empty. I check this by hitting the network tab on chrome's inspect tool.
Is this indicative of a common mistake?
This discussion has been closed.
Answers
For some reason calling a function with the same delete code as above fixed it(outside of the document load). I wonder why this is the case. This is also the case if I want to programmatically edit a field.
Hi @Igorski88 ,
Possibly because the
rowIndex
was being treated as a constant if it wasn't in a function? If this is still an issue, please can you post your code and ideally link to a test case or your page.Cheers,
Colin