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   |
 |
forlano
Messages: 1207 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
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

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

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 872 times)
-
Attachment: pic2.jpg
(Size: 23.31KB, Downloaded 829 times)
-
Attachment: SqlArray2.rar
(Size: 1.56KB, Downloaded 359 times)
|
|
|
Goto Forum:
Current Time: Fri May 09 20:03:11 CEST 2025
Total time taken to generate the page: 0.01292 seconds
|