MX-Frame Library Send comments on this topic.
Date
MX-Developer > User Interface - MxPart > Controls > Date

Glossary Item Box

Control allows date time values to be displayed and edited. Date component can be presented to the user with a drop down calendar or with a text control. The time component of the control is displayed and can be edited in a text control. Using this control the input of a date time value is much easier and faster.

In the calendar the selected day is highlighted. The cell containing the current date has red borders. The format in which date and time values will be displayed can be defined with mask properties, therefore enabling the date time values to be displayed in any culture.

Date control can be used to display value of a certain data source field. It can also serves as a parameter provider for any data source statement.

Control has many properties that define its appearance, design, behaviour etc.

Context Properties

Properties in this section define the appearance of the control in Personalization Directory and the behaviour of the control when in edit mode.

Property Description
Category Define the name by which the control is displayed in Personalization Directory.
Entity Defines the name of the group in which the control is located in Personalization Directory.
NavigationVisible The feature is obsolete.
TrackDirty Defines whether user interface can be closed while the control is in edit mode.

Data Properties

Properties in this section define how and which data is bound to the control.

Property Description
Adapter Defines the MxAdapter component from which data can be retrieved and used for any kind of manipulation.
DataMember Defines the scheme field of which the value is displayed in the control.
DataSourceName Defines the data source which will be used to display and manipulate data.
Parameters Defines the input parameters for any desired statement; readable or writable.
Key Define the key by which the control is uniquely represented in the system.
Scope Defines the scope for which the value is remembered.

Design Properties

Properties in this section define basic properties of the control, appearance and functionality of the control.

Property Description
Name Defines the name of the control or the component.
DefaultValue Defines the value displayed when no other value is selected by a user.
AllowNullInput Defines whether it is possible to enter null values in the control.
DisplayTime Defines whether the time component is also displayed.
MaxValue Defines the maximum value which can be entered in a control.
MinValue Defines the minimum value which can be entered in a control.
NullText Defines the text displayed when the control has null value assigned.

NOTE: Properties described here are related exclusively to Mx Controls. For the description of other properties please see Developer Express documentation.

Example (MxSpace)

To see the implementation of Date control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click WorkOrderManagePart.cs. See the Date control used for filtering data.

To implement Date control

  1. In Solution Explorer open the desired MxPart component (WorkOrderManagePart) and add Date control from the Toolbox on the canvas to a desired location.
  2. Select the control and open Property Window.
  3. In MinValue property of the control define the minimum value that a user will be able to enter (DateAdd('year',-300,Today())).
  4. In Parameters property define the parameter and the statement to which the value is passed.
©2009 Metronik. All Rights Reserved.