on 10-06-2010 6:46 AM
Hello All,
I am using a table UI element in which records are displayed . I want 2 or 3 records to be selected by default in that displayed table . I am able to select one record as selected by default as
node->set_selected ( index = lv_index ) .. I am setting the index . want to set more than 1.
Regards,
Sana..
Hi ,
It can be achieved using the set_selected() method of if_wd_context_element.
Sample code.
DATA lo_nd_flight_node TYPE REF TO if_wd_context_node.
DATA lo_el_flight_node TYPE REF TO if_wd_context_element.
DATA ls_flight_node TYPE wd_this->element_flight_node.
* navigate from <CONTEXT> to <FLIGHT_NODE> via lead selection
lo_nd_flight_node = wd_context->get_child_node( name = wd_this->wdctx_flight_node ).
lo_el_flight_node = lo_nd_flight_node->get_element( index = 3 ).
lo_el_flight_node->set_selected( FLAG = abap_true ).
lo_el_flight_node = lo_nd_flight_node->get_element( index = 5 ).
lo_el_flight_node->set_selected( FLAG = abap_true ).
In the above code , I set 2 elements with index 3 and 5 as selected by default.
Make sure that you have set the selection property of context node as 0:n ..
Thanks,
aditya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure the the selection property of the node should be 1..n or 0..n.
Regards,
Sharath
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 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.