on 03-19-2009 9:29 AM
Hi everyone,
I don't know how to define the texts for Dropdownlistbykey. It seems that Dropdownlistbykey has an attribute "selected key", but where can I bind the texts I want to display when user clicks the downwards
arrow?
Thanks in advance.
Aaron,
The values of drop down by key are populated with the help of value set. In that we pass the key and value of the item which is displayed in the drop down list. So when we expand the drop down list we see the value of the items and when we select any item, its key gets selected.
Refer the code (for drop down by key) given bt saurav in thread: .
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To display the values in the dropdownbyKey, bind the field with an attribute based on the DDIC domain.
It will display the values maintained in the domain level. If you want to add more valued in the runtime
maintain a table like this
value_set_item-key = 'X'.
value_set_item-value = 'Charter'.
insert value_set_item into table lt_value_set.
You have to maintain both key and value and upload the table to your attribute like
lr_node_info->set_attribute_value_set( NAME = "attribute name" VALUE_SET = table name).
Hope this help you
Regards,
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Check the Standard Component WDR_TEST_EVENTS for the dropdownbykey.
Hopes this will helps you.
Regard
Manoj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
you can use this code :
method WDDOINIT .
DATA : node_info TYPE REF TO if_wd_context_node_info,
value1 TYPE wdy_key_value,
set TYPE wdy_key_value_table,
k1 type string value 'M',
v1 type string value 'MAGO',
k2 type string value 'S',
v2 type string value 'Saurav'.
*
value1-key = k1.
value1-value = v1.
APPEND value1 to set.
value1-key = k2.
value1-value = v2.
APPEND value1 to set.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node('FOR_DROP').
node_info->set_attribute_value_set( name = 'DROP_KEY' value_set = set ).
I hope it helps.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.