I have a table where Users can add rows as needed. I use the instance manager for this, (.Row1.instanceManager.addInstance(1);). I also have an item# column that sequentially numbers the columns,(this.rawValue = 0 + this.parent.index+1;)
The problem is, if a User adds 6 rows, for example, and then deletes row 3, the item column doesn't renumber. The table displays with Row 1,2,4,5,6 displaying.
If I delete more a quantity of rows, it subtracts the quantity I deleted and adds from there. So if I added 6 rows, deleted rows 2,3 and 4, the script calculates 6-3=3 and starts adding row 4,5,6, even though rows 1, 5 and 6 are displaying.
Can anyone help me out with the proper script?
Thanks in advance
Gillian
The script that you have is probably OK (this.rawValue = this.parent.index + 1), just move this script to the layoutReady event. This way when a row is deleted, the layoutReady event fires and all of the item numbers will automatically update.
Hope that helps,
Niall
Hope this helps,
Niall
Assure Dynamics