Adding table rows works fine when I use this script: Table.Row1.instanceManager.addInstance(1);
When users click Delete, it always deletes the second (and shifts the rest up), no matter what row they want to delete. I have the following script to delete a table row:
What do I need to change in order to delete the row that is clicked?
add an instance is easy as you only need to specify true or false (1 or 0)
but for deleting row it is a little different, instead or specifying true of false, you need to specify which row you want to delete...
If your delete button is inside the row itself, you can use the index of the parent's row of the delete button
As stated by Magus069, it's better to have a delete button with each row, since that simplifies your script for deletion (it's pretty much repetition), and secondly having individual delete buttons, give users the power to choose which row they specifically want to delete.
Thanks a mill Magus!
Works like a charm !