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.

Renaming sorted records in table

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2008, 10:29 PM
Junior Member
 
Join Date: Jun 2008
Posts: 39
Default Renaming sorted records in table

Hi, I have a TABLE with a NAME column that contains duplicated entries for some records. I want to put the field values of this column into a combo box. The table is sorted on this column so that identical field values are grouped together.

But, since the combo box doesn't display the selected index properly if there are duplicate values, I need to rename the fields in the table column with something like name-1, name-2, name-3, etc.

I thought I was losing my mind until I noticed others on this forum had run into the issue discussed elsewhere whereby the table is dynamically re-sorting the records every time a field value is changed. I've had to come up with a complicated slice of code to deal with this, and I'm wondering if there's a simple way to handle this problem.

I'm thinking this really isn't an unusual thing one might want to do, so perhaps some of you have figured out the easy way? I'm guessing I probably missed something really simple, like I usually do, being a newbie to b4.

For instance, is there a way to make the table static while I update the fields, then turn on the sorting again? I don't see any command documented around this anywhere.

Tks, Adrian
Reply With Quote
  #2 (permalink)  
Old 06-24-2008, 11:17 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

I was under the impression that a table only sorted if wanted....and when wanted...
To address your case...
I see, one possible way...
Re-create an array before sorting, and use the arry index...
but the ral best would be to avoid duplicates...
escpecially enter using them to fill a combo...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #3 (permalink)  
Old 06-25-2008, 12:09 AM
Junior Member
 
Join Date: Jun 2008
Posts: 39
Default

Hi Paulo, thanks for that. I thought about using an array, but since a table is a type of array I didn't see the point in using another similar device, but maybe that's what I have to do. I can't avoid duplicates in this column because it is a case where there are multiple orders for the same client.

Regards, Adrian
Reply With Quote
  #4 (permalink)  
Old 06-25-2008, 04:54 PM
Junior Member
 
Join Date: Jun 2008
Posts: 39
Default

Hi, just FTR, I realized the way to do this is to create a new column that isn't sorted on and create new value of NAME field and put the new value in the matching cell of the same row in the new column.

Tks, AB
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
getting records alphabetically gjoisa Questions (Windows Mobile) 2 05-10-2008 06:52 PM
Table with 2000 records. How to find with more speed? faustinofaria Questions (Windows Mobile) 1 03-24-2008 06:36 PM
Sorted objects when adding agraham Basic4ppc Wishlist 0 11-18-2007 03:47 PM
Objects are not sorted in project explorer windows agraham Bug Reports 0 11-18-2007 03:43 PM
renaming DLLs Cableguy Questions (Windows Mobile) 2 05-24-2007 04:35 AM


All times are GMT. The time now is 09:56 AM.


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