on 01-06-2009 10:01 AM
hi,
what is the Event for expand and collapse in TreeByKeyTableColumn?
Can anyone help on this.
Best regards,
Rohit
Events are always documented in the online help:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/59/a98b411fb4b05fe10000000a1550b0/frameset.htm
There is no such event for the TreeByKeyTableColumn. Only an onLoadChildren event.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is no event to expand or collapse.
create an attribute 'EXPANDED' of type wdy_boolean in the context and bind it to the property ' Expanded' of TreeByKeyTableColumn.
and write the code accordingly to expand or collapse in wdmodifyview method. for example
CALL METHOD lo_nd_tree_node->get_selected_elements
RECEIVING
set = lt_temp.
LOOP AT lt_temp INTO wa_temp.
lo_el_tree_node->set_attribute( name = `EXPANDED` value = 'X' ).
ENDLOOP.
Regards,
Lakshmi.
Edited by: Lakshmi Atukury on Jan 6, 2009 11:52 AM
Edited by: Lakshmi Atukury on Jan 6, 2009 11:52 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
event EXPAND_NC in class CL_GUI_ALV_TREE
Following code will be executed when COLLAPSE ALL button is clicked.
DATA: lo_nd_tree TYPE REF TO if_wd_context_node,
lt_elements TYPE wdr_context_element_set.
FIELD-SYMBOLS:
<lo_element> TYPE REF TO if_wd_context_element.
lo_nd_tree = wd_context->get_child_node( name = wd_this->wdctx_tree).
lt_elements = lo_nd_tree ->get_elements( ).
LOOP AT lt_elements ASSIGNING <lo_element>.
<lo_element>->set_attribute(
EXPORTING value = abap_false
name = u2018EXAPNDEDu2019 ).
ENDLOOP.
Following code will be executed when EXPAND ALL button is clicked.
DATA: lo_nd_tree TYPE REF TO if_wd_context_node,
lt_elements TYPE wdr_context_element_set.
FIELD-SYMBOLS:
<lo_element> TYPE REF TO if_wd_context_element.
lo_nd_tree = wd_context->get_child_node( name = wd_this->wdctx_tree).
lt_elements = lo_nd_tree ->get_elements( ).
LOOP AT lt_elements ASSIGNING <lo_element>.
<lo_element>->set_attribute(
EXPORTING value = abap_true
name = u2018EXAPNDEDu2019 ).
ENDLOOP.
and also you can check in the standard program BCALV_GRID_EDIT
Thanks!!
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 | |
24 | |
11 | |
9 | |
7 | |
6 | |
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.