cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown by index?

Former Member
0 Kudos

Hi..

What is the main difference between Dropdwon by Key and Dropdown byIndex?

with

Jeyapaul.M

Accepted Solutions (0)

Answers (5)

Answers (5)

nikhil_bose
Active Contributor
0 Kudos

If all DD values are available in context, DDByKey is used.

or if generating values using IModifiableSimpleValueSet or From a SimpleType, DDByIndex is used.

nikhil

former_member201361
Active Contributor
0 Kudos

Hi ,

please refer this link for drop down

[http://help.sap.com/saphelp_nw70/helpdata/EN/4a/8613e41629344194e4f40393740d51/frameset.htm]

thanks and regards

Former Member
0 Kudos

Hi,

read this: [Data Binding|http://help.sap.com/saphelp_nwce10/helpdata/en/45/3623e261d81ba3e10000000a155369/frameset.htm]

Kind regards

Stefanie

srinivas_sistu
Active Contributor
0 Kudos

Hi,

**DropDownByKey :**

A DropDownByKey UI element provides the user with a selection list from which he or she can select no more than one entry. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When you select the pushbutton, a list with all possible values is displayed.

The dropdown list box UI elements do not differ from each other when displayed on the screen. However, the data binding model for the DropDownByKey UI element has a completely different concept. See Data Binding Within Web Dynpro and Data Binding of a Dropdown List Box and Radio Button Group).

When using a dropdown list box, always display this UI element alongside a Label UI element (that is, an element with a label) to ensure accessibility.

Description of UI Element Properties

· labelFor

The DropDownByKey element can also be used as a label for other UI elements. You can use the labelFor property to reference to a UI element.

· selectedKey

Use this property to determine the value from the value set, which is to be selected from the list of the dropdown listbox.

· size

This property is deprecated and can no longer be used.

**DropDownByIndex :**

The Web Dynpro class DropDownByIndex , which implements the IWDDropDownByIndex interface, is the base class of the dropdown list boxes for which index binding is used.

Definition

A DropDownByIndex UI element provides the user with a dropdown list box. You cannot select more than one entry from the selection list. The UI element consists of a text field, a button, and a selection list. Any list entry already selected is displayed in the text field. When selecting the button, a list with all possible values is displayed.

When using a dropdown list box, always display this UI element alongside a label to ensure accessibility.

Description of UI Element Properties

· labelFor

The DropDownByIndex element can also be used as a label for other UI elements. You can use the labelFor property to reference to a UI element.

· selectionChangeBehaviour

The change of the lead selection can cause a data loss u2013 for example, if the changed or new data was not written to the context due to syntax errors. You can avoid the data loss using the selectionChangeBehaviour property before changing the lead selection:

auto

If the data was written to the context, the value auto specifies that the ItemListBox automatically changes the lead selection of its data source directly after an interaction by the user before the corresponding event is triggered.

manual

Specifies that the ItemListBox does not change the lead selection of its data source after an interaction by the user but triggers the corresponding event. In this case, the event handler must change the lead selection to enable the ItemListBox to display the data in a main detail view, for example. This setting allows you to check the change of the lead selection.

· size

This property is deprecated and can no longer be used.

Regards,

Srinivas.

Former Member
0 Kudos

HI

Drop down by key and drop by index are two types of search help

Drop down by key is used when values in the input field for search help are less than 30 constants

DD by index if they are more than 30 cionstants

Dropdown by key is used when values are known at design time

Drop down by index is used when values are expected at runtime.

DDBI,DDBK considered as Simple value selector