on 03-16-2009 7:31 AM
Hi all,
I am having a radio button in my table. On click of that radio button the corresponding row of the table should be selected. Can anybody help me to do it.
Thanks,
Mugundhan
Hi Kandha,
Use the following code:
data: lr_element type ref to if_wd_context_element,
lv_index type i.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
lv_index = lr_element->get_index( ).
Use this code in the onSelect method of radio button.
This code will give the index of the selected row. Get the values of the table in an internal table and read the value at that perticluar index.
I hope it helps.
Regards
Arjun
Edited by: Arjun Thakur on Mar 16, 2009 1:10 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arjun,
what is happening in this line.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
The node i binded to the table is "INBOX", it is having a child node called "CHILD_INBOX" . CHILD_INBOX is having a attribute called "RADIO" which is binded to the radio button UI of the table. So what should i pass into the above statement.
Thanks,
Mugundhan
Kandha,
You don't have to pass any attribute name in this statement. Use it as it is.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
This line is used to get the selected row from the table. Use it in the OnSelect method of radio button.
To get the details about what this line is doing, refer this [thread|; and see the explaination given by Uday.
Regards
Arjun
Edited by: Arjun Thakur on Mar 16, 2009 1:38 PM
hi
in on_select event u wright the following code.
DATA:
node_bank TYPE REF TO if_wd_context_node,
lv_index type i.
node_bank = wd_context->get_child_node( name = if_v_temp=>wdctx_bank ).
CALL METHOD node_bank->get_attribute
EXPORTING
name = 'radio_attt'
IMPORTING
VALUE = lv_value
.
IF lv_value EQ X.
lv_index = node_bank->get_index( ).
node_bank->set_index( lv_index ).
ENDIF.
regards,
Vivekananthan.S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.