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

Glossary Item Box

Defines the input parameters for any desired statement; readable or writable.

Remarks

Property specifies input parameters for statements defined in current data source, in other data sources in current adapter or for statements defined in data sources in different adapters. Functionality of this property enables the developer to transfer any data, even the one from other adapters. This ensures total, unlimited and unrestricted data flow in a business logic.

Parameters are managed in ParameterMapping Collection Editor. Editor contains two commands for adding and removing mapping items.

Command Description
Add Adds a mapping item to the end of the Members list.
Remove Removes currently selected item from the Members list.

Each item has several properties available which can be used to determine the data and its behaviour and bindings.

Property Description
AutoExecute  Defines whether statement defined in property Statement is executed immediately after the value is set in the control. If property is set to True, statement is executed immediately after the new value is confirmed in the control. If property is set to False, new value can be entered but statement will not be triggered, only the value of its parameter will be set.
AutoSynchronize  Defines whether the value of the control changes if the parameter’s value is changed. If property is set to True and the value of the parameter is changed, by some other mean, the value in the control also changes to the appropriate value. If property is set to False, value in the control will not be changed.
Parameter  Defines the parameter to which the value, selected or entered in the control, will be passed. It is possible to select parameter from the list of parameters defined for statement selected in property Statement.
Statement  Defines the statement to which the value of a parameter will be passed. Based on the statement selected, list of parameters will be populated in property Parameter.
Adapter  Defines the adapter whose data sources will be used to determine the statement and its parameter to which the value of the control will be passed.
DataSourceName  Defines the data source which holds the statement which will receive the value as a parameter. It is possible to select from data sources created in the adapter defined in property Adapter.

Example (MxSpace)

To see the defined Parameters property on a control (AdvancedText) open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click StockPart.cs. Click the grid control and open Property Window. See the created mapping item in the Parameters property.

To add a parameter mapping item

  1. In Solution Explorer open MxPart component (StockPart) which contains control (AdvancedText) for data binding.
  2. Select the desired control (AdvancedText – Last Name) on the canvas.
  3. Open Property Window.
  4. In section Data in Parameters property click edit button.
  5. In ParameterMapping Collection Editor click Add button.
  6. Define properties displayed on the right so that they determine a statement parameter.
  7. Click OK.

See Also

©2009 Metronik. All Rights Reserved.