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

Glossary Item Box

When implemented ImageDropDown editor is visible in normal mode and edit mode. This means that data displayed in the grid can be presented along with an icon or only with an icon. Of course values must be somehow anticipated. For each value an image is defined. It is also possible to define a default image which is displayed with unexpected values.

Implementation of this kind of editors breaks the monotony and the boredom of endless numbers and strings. It makes user interface much more comprehensible and easy on the eyes.

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

Property Description
DefaultIcon Image selected in this property is used when a value arises which does not have defined a mapping to an image.
FormatString Defines the format in which the text will be displayed. The processing of the text also depends on the value defined in the TextFormat property.
Images The property is defined with ColumnImage Collection Editor. The developer can define any number of mappings. The value of the mapping is defined with Expression Designer. This gives the developer a lot of possibilities in defining mapping values.
NullText Defines the string that is displayed if the value of a field is missing or null.
ShowText If property is set to True, the value is displayed together with the icon. If property is set to False, only the icon is displayed.
TextFormat Defines the type of data which will be displayed. It is possible to choose between Numeric, DateTime or None. Based on the value selected format string in property FormatString is processed.
AllowNullInput If property is set to True, null value can be entered in the editor.

Example (MxSpace)

To see the implementation of a ImageDropDown editor in MxSpace application click Production -> Manage. See that the first column (StatusId) displays its value not with numbers but with different icons.

To implement a DropDownImage editor on a field

  1. Open appropriate adapter (WorkOrderAdapter) in Solution Explorer.
  2. Expand the desired field (StatusId) in the appropriate data source schema (WorkOrder).
  3. Click Editor node and select ImageDropDownEditor from a list of editors in the Available Editors section on the right.
  4. Define a default icon in DefaultIcon property.
  5. Define value – icon mapping in property Images.
  6. Set ShowText property to False

 

See Also

MxAdapter
Editors

©2009 Metronik. All Rights Reserved.