on 08-06-2014 2:53 PM
Hi
Is it possible to hide/unhide a UIElement when using the row repeater? I have a list of items showed with an RowRepeater - but in some of the items i do want a checkbox to be visible for the user and sometimes not.
That is: the checkbox should be invisible in some items and ready for input in others.
Example:
Text: Item 1
Price: 123.45
-----
Text: Item 2
Price: 321,45
-----
Text: Item 3
Price: 999,88
<checkbox>
-----
Hi Jakob,
Yes its possible, to control the visibility of items inside row repeater
Please follow the below steps to achieve your requirement
ls_data-Text = 'Item 1'.
ls_data-Price = '123.45'.
ls_data-check_vis = '01'. "hidden
append ls_data to lt_data
-----
ls_data-Text = 'Item 2'.
ls_data-Price = '123.45'.
ls_data-check_vis = '01'. "hidden
append ls_data to lt_data
-----
ls_data-Text = 'Item 3'.
ls_data-Price = '123.45'.
ls_data-check_vis = '02'. "Visible
append ls_data to lt_data
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Petersen,
If you want to hide the UI element checkbox without adding an extra attribute, check with the following code where you can change code to set visible property..
lo_element_set = lo_node->get_elements( ).
loop at lo_element_set into lo_element.
IF <condition>.
lo_element->set_attribute_property
EXPORTING
attribute_name = 'ATTRIBUTE_NAME' " Attribute name of the check box
property = lo_element->e_property-visible
value = ABAP_FALSE.
endif.
endloop.
Make sure u have binded the visible property of UI element.
Regards,
Harsha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.