save and load data

You must Login before you can answer or comment on any questions.

hi, i have an empty tableview and i add rows at runtime.

My question is: how can i save all the rows inserted with relative data? so if i close and reopen the app i will find the rows i inserted before with all relate data? Thanks

2 Answers

Accepted Answer

You can use file system or database to store your custom run-time rows data. when you reopen the windows you can load them from your store.

when you insert your data to tableview put a button with title: "save data", and on click event with for() iterate all rows and save to local database or any store where you can reach.

— answered 2 years ago by Emrah Mehmedov
answer permalink
1 Comment
  • for( var r = 0 ; r < tableView.data[0].rows.length ; r++){
       var name = tableView.data[0].rows[r].children[0];
       var addres = tableView.data[0].rows[r].children[1];
       var mail = tableView.data[0].rows[r].children[2];
     
       //save to local database
        //open database
        //execute query
        //close database
    }

    — commented 2 years ago by Emrah Mehmedov

Use database to store and retrieve table view row values.

Your Answer

Think you can help? Login to answer this question!