Hi,
I have a tablecontrol with a column w dropdownbox. When the tablecontrol is editable it shows the description values in the dropdownbox.
When you set displayonly() to a tablecontrol, it doesnot show the visible values (descriptions) that stood in the dropdownbox, but the values in the database (table). How can this be achieved?
Regards, Harry
[/img]
displayonly tablecontrol ( dropdownbox )
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
-
- Moderator
- Posts: 184
- Joined: Tue Sep 11, 2007 8:58 am
Harry,
First of all, the same principles apply whether the dynamic list is in a table column or in a form field
I'm not sure what you're trying to achieve.
Database table has entries:
Desciption1 ID1
Desciption2 ID2
etc
Question1. When the user selects a Desciption, do you want to store the Desciption or the ID in that field.
Question2. When the dropdown has a value and is displayonly, what do you want to show in the field.
First of all, the same principles apply whether the dynamic list is in a table column or in a form field
I'm not sure what you're trying to achieve.
Database table has entries:
Desciption1 ID1
Desciption2 ID2
etc
Question1. When the user selects a Desciption, do you want to store the Desciption or the ID in that field.
Question2. When the dropdown has a value and is displayonly, what do you want to show in the field.
0 x
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Hi Harry,
I think you want to display the Description/Display value instead of the <b>actual</b> value when the table control is read only?
You will have to show a different column and substitute the value with the display value from the List:
Create a before table event that processes the values and write script as follows:
Note:
You will need to display table.MY_TABLE.DISPLAY_COL instead of table.MY_TABLE.MY_VALUE.
I think this should work.
Steve
I think you want to display the Description/Display value instead of the <b>actual</b> value when the table control is read only?
You will have to show a different column and substitute the value with the display value from the List:
Create a before table event that processes the values and write script as follows:
Code: Select all
function convertReadOnlyColumn()
{
//hide table.MY_TABLE.MY_VALUE field control
// show table.MY_TABLE.DISPLAY_COL field control
//..
//..
var rows = tables.MY_TABLE.rows;
while ( rows.next() )
{
table.MY_TABLE.DISPLAY_COL.value = table.MY_TABLE.MY_VALUE.getList().getDisplayValue(table.MY_TABLE.MY_VALUE.value);
}
}
You will need to display table.MY_TABLE.DISPLAY_COL instead of table.MY_TABLE.MY_VALUE.
I think this should work.
Steve
0 x
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 118
- Joined: Tue Oct 23, 2012 7:01 am
- Location: The Netherlands
-
- Moderator
- Posts: 421
- Joined: Fri Sep 07, 2007 3:44 pm
- Location: Sandy, UK
- Contact:
Who is online
Users browsing this forum: No registered users and 11 guests