cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown values

Former Member
0 Kudos

Hi experts,

In My dropdown I have 10 values(i used dropdownbyindex). I need to highlight the some selected values. ? I need to highlight the some 3 values(it means3 values should be selected in the dropdown).. How to do that?

Regards,

P.Manivannan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U can use ItemListBox instead of dropdownBy and make the multiselect as true.

The follwing links will be helpful to solve your problem :

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b09cc7ef-8185-2b10-4aaa-96ffc93d237c]

[http://help.sap.com/saphelp_nw04s/helpdata/en/23/928b411fb4b05fe10000000a1550b0/content.htm]

Thanks

Ritushree

Former Member
0 Kudos

Hi All,

Thanks for ur reply. I used ItemListobx for multiple selection..I changed Multipleselection----->true. My question is how to highlight the some values in listbox(not going for manually).. how to do that...

Regards,

P.Manivannan

former_member185086
Active Contributor
0 Kudos

Hi

In ItemlistUI element selection will automatically make it highlighted (With light yellow).

or

for better effect u can assign some icons to your selection.

Best Regards

Satish Kumar

Edited by: satish jhariya on Mar 18, 2009 3:02 PM

Former Member
0 Kudos

Hi satish,

I need 3 selected values out of 10 values in the item list box...how to do that?

Regards,

P.Manivannan

former_member185086
Active Contributor
0 Kudos

Ok

10 Data is there right ? Did u define the multiple selection true

Now On actionLeadSelected

for (int i = 0; i < 15; i++)
		{

// In place of this above for loop u have to take the size of the node which is bound to LIst UI

// This is your Node which is bound to Item List UI elelmt 
			IPrivateTestView.ITestNodeElement dd = wdContext.nodeTestNode().getTestNodeElementAt(i);
			wdComponentAPI.getMessageManager().reportSuccess(dd.getA());
		}

Best Regards

Satish Kumar

Edited by: satish jhariya on Mar 18, 2009 3:18 PM

Former Member
0 Kudos

hi

Mutliple Selection in the Item List Box , is just as multi selection in the table .

After you have made the Multi Selection Property to true , Control + mouse click .

Former Member
0 Kudos

Hi sathish,

I have one button and Itemlistbox. Initially ItemListBox Containing 10 Values(whenever running the application in ItekListbox showing 10 values). When i Clicking the Button. The 3 values only should be selected out of 10 values(other 7 values are presentin the ItemListbox only 3 values should be selected.it means higlighted). How to do that...Please help about this.

Leadselection it not be helpout

Regards,

P.Manivannan

former_member185086
Active Contributor
0 Kudos

Hi

On click of a button any Three value will get highlighted right?

After highlighted what u want

--- 3 will be removed remaining 7 will be there ?

-


Is this in any random order ?

if u need only random selection then code is

// For populating the value 
// I have done this for my test please avoid if data is already there in list box 
for (int i = 1; i <= 10; i++)
		{
			IPrivateTestView.ITestNodeElement ele = wdContext.nodeTestNode().createAndAddTestNodeElement();
			ele.setA("value" + i);
		}
		wdContext.nodeTestNode().setLeadSelection(-1);

// For button action 
for (int i = 0; i < 3; i++)
		{
			wdContext.nodeTestNode().setSelected(i, true);
		}

Reason to fail :

1. Make sure the multiple selection of ItemList UI is true.

2.The value node by which u bound the ItemList UI element its selection cardinality property should be 0..n

Best Regards

Satish Kumar

Former Member
0 Kudos

Hi Sathish,

This is my exact my requirement. Thanks for ur valuable replies. I just highlight the Values coming from backend.

after adding element ivalues should be displayed in the itemListbox


for (int i = 1; i <= 10; i++)
				{
					IPrivateItemView.ITestElement ele = wdContext.nodeTest().createTestElement();
					ele.setVa_test("value" + i);
					wdContext.nodeTest().addElement(ele);
				}
				wdContext.nodeTest().setLeadSelection(-1);

Regards,

P.Manivannan

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

In a DropDownByIndex / DropDownByKey UI element you cannot select more than one entry from the selection list.

We use the ItemListBox for multiple selections as also mentioned in the above post.

Use this help link: http://help.sap.com/saphelp_nw70/helpdata/EN/23/928b411fb4b05fe10000000a1550b0/frameset.htm

Regards,

Anagha

former_member185086
Active Contributor
0 Kudos

Hi

Instead of Using DropDown u can use ItemListBox Ui Element ,here u can set multiple selection = true,

and thats it .

In dropdown it is not possible because onec u selected value list will went away(no way to select more than one ).

Best Regards

Satish Kumar

Former Member
0 Kudos

I'm pretty sure you can't do this with a DropDownByKey.

From the documentation:

A DropDownByKey UI element provides the user with a selection list from which he or she can select no more than one entry.

Might be better (but ugglier) to use ItemListBox.

/Björn