on 12-10-2013 8:14 AM
Hi Expert,
I am newbie on Web Dynpro and want to know if that is possible to implement
[Select All] [ Clear ] button as for itemListBox
In the itemListBox i have enabled mutli select option, but i found it hard to select/deselect all unless i create a separate button to do so.
I couldnt find any relevant options available in help.sap.com.
Could someone provide me please
Thanks you!
BR - Chris
Hi Christ,
Yes, itemListBox in WDa is not having option for select all/deselect all
Note: There is an event OnLeadSelect which triggers on select of any item on list box but when you set property "multipleSelection" to true the the event will never trigger
If your requirement is to select all and deselect all items in the list box on any button action , you need to process corresponding to that
add 2 new items say : Select all & Deselect all to the context node at index 1 & 2
Example:
Node contains the data as below
1. Select All
2. Deselect All
3. item1
4. item2
5. item3
6. item4
7. item5
When user selects item "Select All" and clicks on display button.
Now get the selected elements from node using method ( IF_WD_CONTEXT_NODE)~GET_SELECTED_ELEMENTS and
If selected item contains "Select all" then consider all items from index 3 onwards for your processing.
When user selects item "Deselect All" , Refresh the node
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 Rama,
Thanks for your reply.
Both Rama and Sharath shoud be good method to do select/deselect all function.
Is there any method for me set an item selected in itemListBox?
I can only found get_selected_elements but not something like set_selected
Could provide code example if possible?
Thanks.
BR - Chris
As you say, by default the ItemListBox UI does not provide the option "Select All/Deselect All" like in table. Then, you have to have a button or any other UI element with event to perform this for you.
Simplest option would be a button(which toggles) and use it to select all entries or unselect all entries.
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 |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.