Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

TableSort, there's a way to remove a Sort in a table?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2009, 07:23 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default 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
Reply With Quote
  #2 (permalink)  
Old 07-29-2009, 07:35 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 1,057
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

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.
Reply With Quote
  #3 (permalink)  
Old 07-29-2009, 07:36 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

So the way I've used (see #1) is valid?
Reply With Quote
  #4 (permalink)  
Old 07-30-2009, 08:24 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can use:
Code:
table1.TableSort("")
It will remove the sort.
Reply With Quote
  #5 (permalink)  
Old 07-30-2009, 08:39 AM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

I've tried this, but without success!!
Reply With Quote
  #6 (permalink)  
Old 07-30-2009, 08:54 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The following code seems to work just fine:
Code:
Sub App_Start
    Form1.Show
    table1.AddCol(cNumber, 
"c1"100)
    table1.LoadCSV(
"1,csv"","TrueFalse)
    
Msgbox("before sort")
    table1.TableSort(
"c1")
    
Msgbox("after sort")
    table1.TableSort(
"")
    
Msgbox("sort cleared")
End Sub
Reply With Quote
  #7 (permalink)  
Old 07-30-2009, 09:25 AM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

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.

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Keep selected row with TableSort RB Smissaert Questions (Windows Mobile) 3 01-08-2009 04:02 PM
SORT / TRIM Table(CSV) sintaq Questions (Windows Mobile) 1 03-24-2008 09:52 AM
Table sort / date bob Questions (Windows Mobile) 1 11-16-2007 08:15 AM
Sort with SQL JJM Questions (Windows Mobile) 1 06-07-2007 01:03 PM
Table Sort Problems RandomCoder Questions (Windows Mobile) 21 05-22-2007 08:43 PM


All times are GMT. The time now is 08:21 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0