This may help you: https://marketplace.mendix.com/link/component/109072
To do this you need a context object, which is linked to a list of line objects. Every time you hit “Add line”, you create a new line object and link it to your context object. Then you can refresh your context object to show the line on your screen.
Hope this helps!