Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Strange (perhaps) DropList ctrl behaviour
Re: Strange (perhaps) DropList ctrl behaviour [message #33178 is a reply to message #33174] Wed, 13 July 2011 11:19 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
sergeynikitin wrote on Wed, 13 July 2011 08:35

1-st Ctrls must be defined not in layout. (Only like
	EditString author;

2nd
By code is not clear that you want to do in the end?


I've seen others Ctrls defined in Layout.
Any way I have super simplified my test case to only one SqlArray to explain better what I want to achieve.

In master SqlArray I added a droplist ctrl:

		country.Add(12,"Russia");
		country.Add(24,"Czech Republic");
		country.Add(31,"Italy");
                country.Add(36,"Zimbawe");
        		    
		master.SetTable(BOOK);
		master.AddKey(ID);
		master.AddColumn(AUTHOR, "Author").Edit(author);
		master.AddColumn(TITLE, "Title").Edit(title);
		master.AddColumn(COUNTRY, "Country").Edit(country);
		master.Appending().Removing();
		master.SetOrderBy(AUTHOR, TITLE);
 


I want to record in the database the key of the droplist but I want to see on the screen its value.
After some insertion I see the following
index.php?t=getfile&id=3375&private=0
As you see the table show a number (the key) in the third column and nobody knows what countries stand for those numbers.
Instead when I start editing an old row or inserting a new row, the value of the droplist appears

index.php?t=getfile&id=3376&private=0

What I would like is to show ALWAYS in the array the VALUE of the droplist and not its key. The test case is attached.

Thanks a lot,
Luigi
  • Attachment: pic1.jpg
    (Size: 22.94KB, Downloaded 762 times)
  • Attachment: pic2.jpg
    (Size: 23.31KB, Downloaded 723 times)
  • Attachment: SqlArray2.rar
    (Size: 1.56KB, Downloaded 314 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bitwise and, or, xor in sql
Next Topic: Sqlite bugfix: sqlite has no "nowait" option in select statements
Goto Forum:
  


Current Time: Thu May 16 15:34:15 CEST 2024

Total time taken to generate the page: 0.02637 seconds