MX-Frame Library Send comments on this topic.
DefaultValue
See Also
MX-Developer > User Interface - MxPart > Controls > Control Properties > Design > DefaultValue

Glossary Item Box

Defines the value displayed when no other value is selected by a user.

Remarks

Property specifies the value displayed usually at the beginning and if no other value is selected by a user or by any other method such as workflows, scope functionality, etc.

The default value is defined with the help of Expression Designer. This gives the developer wide variety of options in defining the value. To learn more about all functionalities expressions in MX-Frame have to offer see Expression Designer chapter.

Example (MxSpace)

To see the defined DefaultValue property on a control (date) open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click WorkOrderManagePart.cs. Click the date control defining from time and open Property Window. See the value today minus one year defined in DefaultValue property.

To define DefaultValue property

  1. In Solution Explorer open MxPart component (WorkOrderManagePart) which contains control (Date) for which you wish to defined the default value.
  2. Select the desired control (Date – From) on the canvas.
  3. Open Property Window.
  4. In section Design in DefaultValue property enter the desired value (DateAdd('year',-1,Today())).

If the default value is defined, the control will have this value upon user interface start up.

NOTE: Be aware that by setting the default value on a control, the defined value is only displayed in the control. It is not passed to a parameter of a statement, to which the control is bound to, or is in some other way included in some business logic. This must be done separately by defining default values for statement parameters, using workflows, etc.

See Also

©2009 Metronik. All Rights Reserved.