Download the free trial version
Questions (Windows Mobile) Post any question regarding Basic4ppc.
TableSort, there's a way to remove a Sort in a table?
07-29-2009, 07:23 PM
Basic4ppc Veteran
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
TableSort, there's a way to remove a Sort in a table?
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 by ghale : 07-29-2009 at 07:32 PM .
Reason: added info
07-29-2009, 07:35 PM
Basic4ppc Expert
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 by specci48 : 07-29-2009 at 07:37 PM .
07-29-2009, 07:36 PM
Basic4ppc Veteran
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
So the way I've used (see #1) is valid?
07-30-2009, 08:24 AM
Administrator
You can use:
Code:
table1.TableSort( "" )
It will remove the sort.
07-30-2009, 08:39 AM
Basic4ppc Veteran
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
I've tried this, but without success!!
07-30-2009, 08:54 AM
Administrator
The following code seems to work just fine:
Code:
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
07-30-2009, 09:25 AM
Basic4ppc Veteran
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
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.
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT. The time now is 08:21 AM .