giga Well-Known Member Licensed User Longtime User Jan 27, 2014 #1 Is it possible to add content into a file used by tableview and the tableView refreshes immediately with the added content. instead of closing the window and reopening. Thanks in advance.
Is it possible to add content into a file used by tableview and the tableView refreshes immediately with the added content. instead of closing the window and reopening. Thanks in advance.
DonManfred Expert Licensed User Longtime User Jan 27, 2014 #2 just load the new content and add it to the tableview... Or do a complete reload/readding of the tableview... A view does never load new data by itself. It is you who fill the tabeleview by code... And it must be you who add new content to it. Upvote 0
just load the new content and add it to the tableview... Or do a complete reload/readding of the tableview... A view does never load new data by itself. It is you who fill the tabeleview by code... And it must be you who add new content to it.
giga Well-Known Member Licensed User Longtime User Jan 27, 2014 #3 Thanks DonManfred. I understand that, but my issue is I have to close and reopen the app in order to see it. it does not appear in the list until then. Upvote 0
Thanks DonManfred. I understand that, but my issue is I have to close and reopen the app in order to see it. it does not appear in the list until then.
DonManfred Expert Licensed User Longtime User Jan 27, 2014 #4 Did you add the new content to the tableview? Maybe upload your project as zip and we can have a look... If you add the content to tableview then it must be shown... Upvote 0
Did you add the new content to the tableview? Maybe upload your project as zip and we can have a look... If you add the content to tableview then it must be shown...
giga Well-Known Member Licensed User Longtime User Jan 27, 2014 #5 This is what I am doing. Code: Copy Sub Button1_Click List1.Add(EditText1.Text) EditText1.Text = "" ListView1.AddSingleLine(EditText1.Text) File.WriteList(File.DirRootExternal,"test.txt",List1) its adds to the file successful. and listview successful. but I have to close the app and reopen then it shows. Upvote 0
This is what I am doing. Code: Copy Sub Button1_Click List1.Add(EditText1.Text) EditText1.Text = "" ListView1.AddSingleLine(EditText1.Text) File.WriteList(File.DirRootExternal,"test.txt",List1) its adds to the file successful. and listview successful. but I have to close the app and reopen then it shows.
DonManfred Expert Licensed User Longtime User Jan 27, 2014 #6 You must do something wrong... It works... See Example... At begin the listview (NOT tableview!) is filled with 3 items. If you click on button the text from edittext is added to the listview. And it DIRECTLY appears. Without need to reopen. Attachments listviewtest.zip listviewtest.zip 7.5 KB · Views: 275 Upvote 0
You must do something wrong... It works... See Example... At begin the listview (NOT tableview!) is filled with 3 items. If you click on button the text from edittext is added to the listview. And it DIRECTLY appears. Without need to reopen.
DonManfred Expert Licensed User Longtime User Jan 27, 2014 #7 BTW you wrote Code: Copy EditText1.Text = "" ListView1.AddSingleLine(EditText1.Text) The 1st line EMPTIES the edittext and the secondline adds an (empty) string to the listview. BUT is is added... Try Code: Copy ListView1.AddSingleLine(EditText1.Text) EditText1.Text = "" Upvote 0
BTW you wrote Code: Copy EditText1.Text = "" ListView1.AddSingleLine(EditText1.Text) The 1st line EMPTIES the edittext and the secondline adds an (empty) string to the listview. BUT is is added... Try Code: Copy ListView1.AddSingleLine(EditText1.Text) EditText1.Text = ""
giga Well-Known Member Licensed User Longtime User Jan 27, 2014 #8 DonManfred said: You must do something wrong... It works... See Example... At begin the listview (NOT tableview!) is filled with 3 items. If you click on button the text from edittext is added to the listview. And it DIRECTLY appears. Without need to reopen. Click to expand... My apologizes, I said TableView(B4J) instead of ListView. I will revisit my code closer THANKS DonManfred. Upvote 0
DonManfred said: You must do something wrong... It works... See Example... At begin the listview (NOT tableview!) is filled with 3 items. If you click on button the text from edittext is added to the listview. And it DIRECTLY appears. Without need to reopen. Click to expand... My apologizes, I said TableView(B4J) instead of ListView. I will revisit my code closer THANKS DonManfred.
DonManfred Expert Licensed User Longtime User Jan 27, 2014 #9 There is also a TableView in B4A. You wrote in the B4A-Part of the forum and therefore i thought you have problems with B4A, not B4J... The problem in your code seems the wrong order of your commands. See Post in top of your lastpost ... Upvote 0
There is also a TableView in B4A. You wrote in the B4A-Part of the forum and therefore i thought you have problems with B4A, not B4J... The problem in your code seems the wrong order of your commands. See Post in top of your lastpost ...
giga Well-Known Member Licensed User Longtime User Jan 27, 2014 #10 DonManfred said: There is also a TableView in B4A. You wrote in the B4A-Part of the forum and therefore i thought you have problems with B4A, not B4J... The problem in your code seems the wrong order of your commands. See Post in top of your lastpost ... Click to expand... I am running a TableView project in B4J and another ListView project in B4A. Too many projects not enough brain power. I got confused between the two. The problem was the order. THANKS Upvote 0
DonManfred said: There is also a TableView in B4A. You wrote in the B4A-Part of the forum and therefore i thought you have problems with B4A, not B4J... The problem in your code seems the wrong order of your commands. See Post in top of your lastpost ... Click to expand... I am running a TableView project in B4J and another ListView project in B4A. Too many projects not enough brain power. I got confused between the two. The problem was the order. THANKS