PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → How to move an item from a combo box into a table column..
How to move an item from a combo box into a table column..
Started by Gianni Spano, Oct., 25 2004 10:07 PM - 6 replies
Posted on October, 25 2004 - 10:07 PM
Hello to all
I'm a new Windev user and after few months of waiting to start with the product, i have a little issue. I will explain better.
I have a table with few (7) columns. Once i double-click on a row, it shows me the form with all the data. In the form there is a combo box with some items.
When i select an item from the combo, it doesn't return the "displayedvalue", but its combo index.
How can i show in the table column the "real value" instead of its index?
Hope for some help..
Thanks
Gianni


http://www.softline2000.com
Posted on October, 25 2004 - 11:01 PM
File loaded combo:
Under description select content tab: fill in the options to show the file item.
Combo with predefined options in the control:
Create a global array (either window or project depending on where you use it)
Assign your options to the array:
then when you display the item: myitem=globalvar[comboindex]
HTH
Bert
Hello to all
I'm a new Windev user and after few months of waiting to start with the product, i have a little issue. I will explain better.
I have a table with few (7) columns. Once i double-click on a row, it shows me the form with all the data. In the form there is a combo box with some items.
When i select an item from the combo, it doesn't return the "displayedvalue", but its combo index.
How can i show in the table column the "real value" instead of its index?
Hope for some help..
Thanks
Gianni
Posted on October, 25 2004 - 11:43 PM
Hi Bert
Thanks for your speed reply.
I understand what you mean. I explain my needed:
- I fill out the combobox items using "ListAdd (combo1, strItem [i]); " statement.
- I need to pass (for example) the 3th combo item to the column 3, row 4 of table.
As i explained before, now i obtain only the combo index.
I was using another table (ctgrid, an activex from DBI-TECH) using another IDE and it was quite easy to use.
I think, probably, i need to test more better Windev environment. I was using Netcobol for windows before.
If you have a little example (coded) to show me how to handle the issue.
Sorry to bother you, but i'm stopped with this "easy" problem.
Gianni
File loaded combo:
Under description select content tab: fill in the options to show the file item.
Combo with predefined options in the control:
Create a global array (either window or project depending on where you use it)
Assign your options to the array:
then when you display the item: myitem=globalvar[comboindex]
HTH
Bert
Hello to all
I'm a new Windev user and after few months of waiting to start with the product, i have a little issue. I will explain better.
I have a table with few (7) columns. Once i double-click on a row, it shows me the form with all the data. In the form there is a combo box with some items.
When i select an item from the combo, it doesn't return the "displayedvalue", but its combo index.
How can i show in the table column the "real value" instead of its index?
Hope for some help..
Thanks
Gianni
Posted on October, 27 2004 - 3:53 AM
Gianni,
Where are you getting the items you are adding to the form combox box?
Is the control linked to a file item?
Is the table column linked to a file?
Bert
Hi Bert
Thanks for your speed reply.
I understand what you mean. I explain my needed:
- I fill out the combobox items using "ListAdd (combo1, strItem [i]); " statement.
- I need to pass (for example) the 3th combo item to the column 3, row 4 of table.
As i explained before, now i obtain only the combo index.
I was using another table (ctgrid, an activex from DBI-TECH) using another IDE and it was quite easy to use.
I think, probably, i need to test more better Windev environment. I was using Netcobol for windows before.
If you have a little example (coded) to show me how to handle the issue.
Sorry to bother you, but i'm stopped with this "easy" problem.
Gianni
File loaded combo:
Under description select content tab: fill in the options to show the file item.
Combo with predefined options in the control:
Create a global array (either window or project depending on where you use it)
Assign your options to the array:
then when you display the item: myitem=globalvar[comboindex]
HTH
Bert
Hello to all
I'm a new Windev user and after few months of waiting to start with the product, i have a little issue. I will explain better.
I have a table with few (7) columns. Once i double-click on a row, it shows me the form with all the data. In the form there is a combo box with some items.
When i select an item from the combo, it doesn't return the "displayedvalue", but its combo index.
How can i show in the table column the "real value" instead of its index?
Hope for some help..
Thanks
Gianni
Posted on October, 27 2004 - 4:12 PM
Bert,
I have resolved the issue.
I created an array of 13 items and after the form is closed, i check for the combo item index and pass the value stored in the array [combo index].
All is going fine and now i understand how Windev works. It is easy!.
Thanks for your support.
Gianni
Gianni,
Where are you getting the items you are adding to the form combox box?
Is the control linked to a file item?
Is the table column linked to a file?
Bert
Hi Bert
Thanks for your speed reply.
I understand what you mean. I explain my needed:
- I fill out the combobox items using "ListAdd (combo1, strItem [i]); " statement.
- I need to pass (for example) the 3th combo item to the column 3, row 4 of table.
As i explained before, now i obtain only the combo index.
I was using another table (ctgrid, an activex from DBI-TECH) using another IDE and it was quite easy to use.
I think, probably, i need to test more better Windev environment. I was using Netcobol for windows before.
If you have a little example (coded) to show me how to handle the issue.
Sorry to bother you, but i'm stopped with this "easy" problem.
Gianni
File loaded combo:
Under description select content tab: fill in the options to show the file item.
Combo with predefined options in the control:
Create a global array (either window or project depending on where you use it)
Assign your options to the array:
then when you display the item: myitem=globalvar[comboindex]
HTH
Bert
Hello to all
I'm a new Windev user and after few months of waiting to start with the product, i have a little issue. I will explain better.
I have a table with few (7) columns. Once i double-click on a row, it shows me the form with all the data. In the form there is a combo box with some items.
When i select an item from the combo, it doesn't return the "displayedvalue", but its combo index.
How can i show in the table column the "real value" instead of its index?
Hope for some help..
Thanks
Gianni
Posted on October, 27 2004 - 5:33 PM
G'day Gianni
There is no need for an array.
If you fill the combobox by adding values into the initial contents then you can retrieve the current string value with ComboBox..DisplayedValue
If you fill the combo by programing with listadd() then you can add any type of value you like as a glink() then retrieve it by ticking the glink() option in the details pane of the table combobox or glinkactivate() and the ..storedvalue
With Windev, if you think it should be possible the easy way, then invariably it is. A good way of learning when you have an issue like this is to put a STOP command in the exit or change section of the control and then use the debugger to try out various command combinations to see what works in an interactive way.
Regards
Al
Posted on October, 27 2004 - 9:02 PM
G'day Al
Thanks for your reply.
I will check later your suggestions and i will let you know my progress.
Thanks again for your support.
Gianni
G'day Gianni
There is no need for an array.
If you fill the combobox by adding values into the initial contents then you can retrieve the current string value with ComboBox..DisplayedValue
If you fill the combo by programing with listadd() then you can add any type of value you like as a glink() then retrieve it by ticking the glink() option in the details pane of the table combobox or glinkactivate() and the ..storedvalue
With Windev, if you think it should be possible the easy way, then invariably it is. A good way of learning when you have an issue like this is to put a STOP command in the exit or change section of the control and then use the debugger to try out various command combinations to see what works in an interactive way.
Regards
Al