MX-Frame Library Send comments on this topic.
DropDown
See Also
MX-Developer > Data Access Layer - MxAdapter > Designing Data Source > Schema > Designing a Field > Editors > DropDown

Glossary Item Box

Editor consists of input area where user can enter a value. When entering first character, a drop down list appears displaying appropriate records to the user. If the character does not match any value in the list all values are displayed. Items in drop down list can also be refreshed at any moment by clicking Refresh button. If Null values are allowed, it can be selected with the click on the Null button.

The appearance and the behaviour of the DropDown editor can be defined with its properties:

Property Description
AutoSelect  If property is set to True, first record is automatically selected when adding a record. If property is set to False, no record is selected in drop down list.
DisplayMember Defines the field which will be displayed after the drop down list hides. 
FormatString Defines the format in which the text will be displayed.
NullText Defines the string that is displayed if the value of a field is missing or null.
AllowNullInput If property is set to True, null value can be entered in the editor.
DataMember Defines the field from the schema to which the value, of the selected record in the drop down list, is attached. Field, of which the value is used, is defined with property ValueMember. Property is obsolete.
ValueMember Defines the field whose value will be attached to the field defined with property DataMember.
Adapter Defines the adapter from which it is possible to select a data source.
DataSourceName Defines the data source from which fields can be retrieved for properties LinkedMember and ValueMember. It is possible to select any data source created in adapter defined with property Adapter.

Example (MxSpace)

To see the implementation of a DropDown editor in MxSpace application click Code Lists -> Articles. See that column (Measure Unit) can be edited with the drop down editor.

To implement a DropDown editor on a field

  1. Open appropriate adapter (ArticlesAdapter) in Solution Explorer.
  2. Expand the desired field (MeasureUnitId) in the appropriate data source schema (Articles).
  3. Click Editor node and select DropDownEditor from a list of editors in the Available Editors section on the right.
  4. Set Adapter property to ArticlesAdapter.
  5. Set DataSourceName property to MeasureUnitsEditor.
  6. Set DataMember property to MeasureUnitId.
  7. Set ValueMember property to Id.
  8. Set DisplayMember to Name.
  9. Set AutoSelect property to True

See Also

MxAdapter
Editors

©2009 Metronik. All Rights Reserved.