Dynamically add the list on the button click

Need to do functionality like when click on button as a item in the list and show in the list view the list view and should be empty by default when user click on button item will be added on list and listview?

In this I want to add the data in respective of the list index...

I have a expandable widget wrap in a list in expandable i have a button to add media and a textfield in alert box when i tried to add the widget again and again i am getting the same data filled as i did in first one..

Can someone help me

how i can access the index in a list for update, delete and insert at the particular index ?

5 replies