IoSonoPiero Active Member Licensed User Longtime User Jul 29, 2009 #1 Hello, I've read on some posts that a TableSort is forever (like diamonds). There's a way to remove it, so the data can be displayed according to the order of the file? To solve this on a data with has been sorted with TableSort I've used SaveCSV to dump data then I've used Dispose method on table then I've used AddTable to recreate it then I've used LoadCSV to repopulate it It's too stupid or can be a way to do this? Thanks, ghale Last edited: Jul 29, 2009
Hello, I've read on some posts that a TableSort is forever (like diamonds). There's a way to remove it, so the data can be displayed according to the order of the file? To solve this on a data with has been sorted with TableSort I've used SaveCSV to dump data then I've used Dispose method on table then I've used AddTable to recreate it then I've used LoadCSV to repopulate it It's too stupid or can be a way to do this? Thanks, ghale
specci48 Well-Known Member Licensed User Longtime User Jul 29, 2009 #2 Hello ghale, sorry but you have to clear the table and to load the file into the table again to get the "original" order of the rows... specci48 Last edited: Jul 29, 2009
Hello ghale, sorry but you have to clear the table and to load the file into the table again to get the "original" order of the rows... specci48
IoSonoPiero Active Member Licensed User Longtime User Jul 29, 2009 #3 So the way I've used (see #1) is valid?
Erel B4X founder Staff member Licensed User Longtime User Jul 30, 2009 #4 You can use: B4X: table1.TableSort("") It will remove the sort.
IoSonoPiero Active Member Licensed User Longtime User Jul 30, 2009 #5 I've tried this, but without success!!
Erel B4X founder Staff member Licensed User Longtime User Jul 30, 2009 #6 The following code seems to work just fine: B4X: Sub App_Start Form1.Show table1.AddCol(cNumber, "c1", 100) table1.LoadCSV("1,csv", ",", True, False) Msgbox("before sort") table1.TableSort("c1") Msgbox("after sort") table1.TableSort("") Msgbox("sort cleared") End Sub
The following code seems to work just fine: B4X: Sub App_Start Form1.Show table1.AddCol(cNumber, "c1", 100) table1.LoadCSV("1,csv", ",", True, False) Msgbox("before sort") table1.TableSort("c1") Msgbox("after sort") table1.TableSort("") Msgbox("sort cleared") End Sub
IoSonoPiero Active Member Licensed User Longtime User Jul 30, 2009 #7 I'll assure you that yersterday evening THIS CODE doesn't work on my mobile!! Now it works. So, I think that in my code there was something other that don't let me "unsort" the table contents. So I've used the #1 post solution. :sign0161:
I'll assure you that yersterday evening THIS CODE doesn't work on my mobile!! Now it works. So, I think that in my code there was something other that don't let me "unsort" the table contents. So I've used the #1 post solution. :sign0161: