Control is intended for editing data. It is a standalone control and is usually used with a combination with the Grid control. Grid control is used for displaying data and RecordEdit control is used for editing the data selected in the Grid control.
The main difference and the biggest feature are the look and the presentation of data source scheme. Data is presented in an inverted grid, data source fields are displayed as row headers and data source records are presented as columns.
Help section can be displayed for every field. Help contains information about the selected field. Beside the short description of the field, field constraints are also displayed and described.
Security defined for the data source is checked every time edit is ended. This prevents unauthorized users from changing or inserting any data.
Runtime localization is used to determine captions of all fields displayed in the control.
Editing
With the help of several editors editing data was never before easier. Using these editors, data can be selected from a pre-prepared list of values or options. Many different types of editors can be used for editing data. Control can contain editor for any primitive data type as well as more complex such as image, expression, collection, etc.
Following editors are available for easier, more elegant and mostly more efficient data editing.
Editor | Description |
---|---|
Memo | Appropriate for editing multi-line text. |
Expression | Used for editing and defining expressions. |
Time | Appropriate for entering time component of DateTime data type. |
Custom | Intended for complex editors created especially for a particular data or purpose. |
ImageDropDown | Used for selecting an image from a predefined list of images. |
Numeric | Appropriate for editing numeric data. |
AdvancedText | Ideal editor for writing a value or choosing it from the drop down list. |
Calculator | Opens a calculator control which can be used to calculate a numeric value. |
DateTime | Appropriate for entering DateTime values. |
DropDown | Editor contains a list of value from which it is possible to select the desired one. |
Image | Used for selecting different types of images. |
Timestamp | Used for editing data of Timestamp data type. |
To find out more about editor see chapter Editors.
Properties
Control has many properties that define the appearance and the behaviour of the control and the data displayed in the control while the control is in edit mode.
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. |
DataSourceName | Defines the data source which will be used to display and manipulate data. |
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. |
Editor Properties
Properties in this section define the appearance and behaviour of the control when in edit mode.
Property | Description |
---|---|
AutoScale | Defines the layout of the fields when the control is in edit mode. |
CanCollapseGroups | Defines whether it is possible to collapse individual groups. |
CaptionsVisible | Defines whether field captions are visible when the control is in edit mode. |
HelpVisible | Defines whether the help is available to the user when editing data. |
Example (MxSpace)
To see the implementation of RecordEdit control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click ArticlesPart.cs. See the RecordEdit control used for editing data about articles.
To implement RecordEdit control
- In Solution Explorer open the desired MxPart component (ArticlesPart) and add RecordEdit control from the Toolbox on the canvas to a desired location.
- Select the control and open Property Window.
- In Adapter property select the desired adapter.
- In DataSourceName property select the data source containing the field whose value will be displayed.