Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Question about table control


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2007, 04:46 AM
Newbie
 
Join Date: Oct 2007
Posts: 5
Default Question about table control

First of all, let me say **Thank You!** for such a fantastic product!
The more I use it, the better I like it.


On with the question...
I've been doing some testing of the table control, converting data from one delimited format to another (piped to tabbed, comma to piped, etc...) and ran across an oddity that I need some help with. As the example I've attached shows, I can easily sort the table on a given column and it works flawlessly. However, once the table is sorted, saving the results (Table1.SaveCSV) does not save the data as sorted in the table.

Here's my code with some sample data tagged onto the end:
Code:
Sub Globals
	'Declare the global variables here.

End Sub

Sub App_Start
	Form1.Show
	Table1.Height = 200
	Table1.Width = 240
	Table1.Visible = true
	Table1.Enabled = true
	Table1.Color = 255,255,255
	Table1.HeaderColor = 100,200,222
	Table1.LinesColor = cGold
	Table1.LoadCSV ("data1.csv", "|", True, True)

	AddButton (Form1, "Button1", 20, 220, 100, 30, "Click Me!")
	Button1.color= Form1.Color
	AddEvent ("Button1", Click, "ButtonsClick")
	
	
End Sub

Sub ButtonsClick
'I = Asc ("9")
Table1.TableSort ("PartNumber ASC")
Table1.SaveCSV ("exporteddata.csv", Chr(9),False)'tabbed format
End Sub

'Sample Data Used For Testing:
'
'Whse|PartNumber|OnHand|
'2|100602-0025|1|
'2|10A902-1618|1|
'4|10A982-1650|18|
'2|10A982-1650|2|
'2|118432-0035|1|
'4|118432-0035|3|
'4|118432-0036|1|
'2|118432-0060|1|
'4|118432-0140|28|
'4|121312-0060|11|
'1|121312-0060|36|
'4|124335-8104|6|
'2|124335-8101|1|
'2|124335-8104|9|
'2|125K02-0005|3|
'2|125K02-0015|2|
'2|125K07-0060|1|
'4|125K07-0060|1|
'2|126302-0279|1|
'4|126312-0023|12|
'2|126312-0023|1|
'2|126312-0023|1|
It seems that once the table has been sorted, it would save the same way...
Am I just missing something again?

Ez
Reply With Quote
  #2 (permalink)  
Old 10-26-2007, 07:11 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

Sorting the table doesn't change the database.
It only changes the way it appears.
Filtering the table will also won't change the database.
If you want to save the result you can copy the rows to a new table and then save the new table data.
Reply With Quote
  #3 (permalink)  
Old 10-26-2007, 11:16 AM
Newbie
 
Join Date: Oct 2007
Posts: 5
Default

Okay, thank you very much for the info!
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Control what can be done scott93727 Share Your Creations 0 06-22-2008 05:39 AM
Calendar control a simple and a complicated question Cableguy Questions & Help Needed 3 02-09-2008 06:45 PM
Using calendars with a table control kolbe Questions & Help Needed 7 01-25-2008 09:38 AM
For the Table Control alfcen Basic4ppc Wishlist 1 11-08-2007 04:19 PM
Scroll bar on Table control HARRY Questions & Help Needed 1 05-11-2007 10:08 AM


All times are GMT. The time now is 10:12 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0