on 04-30-2009 9:17 AM
Hi!
How can i set only one or two radiobuttons in a radiobuttongroupbykey to readonly?
My problem is that i have a radiobuttongroupbykey with 3 buttons. The buttons are binded to
an attribute with 3 values. 0, 0.5 and 1. In some cases only one of these three buttons may be selectable.
Should i use three seperate buttons for this or is it possible to use the radiobuttongroupbykey?
Hope someone could help me!
Thanks!!
Hi,
Yes you can disable a few radio buttons from a radiobutton group.
Create an attribute 'editable' type boolean in your node.
Bind this to the editable property of your radiobutton group.
Now based on your condition pass abap_true or abap_false.
DATA: itemlist TYPE if_v_main=>elements_cn_radiobtn,
w_list LIKE LINE OF itemlist.
w_list-key = 'Black'.
w_list-editable = abap_true. " editabke
APPEND w_list TO itemlist.
w_list-key = 'White'.
w_list-editable = abap_false. "disabled
APPEND w_list TO itemlist.
w_list-key = 'Orange'.
w_list-editable = abap_true. " editable
APPEND w_list TO itemlist.
w_list-key = 'Pink'.
w_list-editable = abap_true. "editable
APPEND w_list TO itemlist.
DATA: items_node TYPE REF TO if_wd_context_node.
items_node = wd_context->get_child_node( name = `CN_RADIOBTN` ).
items_node->bind_table( itemlist ).
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refer the standard component : Wdr_test_Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.