Salesforce

.NET - .NET Properties (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

.NET - .NET Properties (Magic xpa 3.x)

Property

Description

Mobile Support

.NET Object

The .NET variable.

When zooming to select a variable for a .NET control, the variable selection list will include only the .NET variables whose class inherits from System.Windows.Forms.Control. In order to use a .NET control, you have to load the System.Windows.Forms assembly into the CRR.

  • If no model is defined for the control, then all of those variables are shown.

  • If a model is defined for the control, then only variables with the same object type defined in the model are shown.

Object Type

This read-only property defines the .NET object of the control, as defined for the variable.

Object Properties

Zoom from this field to access a property sheet that displays the properties from the .NET object that you selected. You can change the properties using simple values or expressions.

It is not recommended to use a .NET constructor in the .NET Object Properties since this means that a new .NET object will be created every time the form is refreshed. If you need to create a new object that will be used as an expression in a .NET object property, it is recommended to create a new .NET variable, run the constructor on it, and then use the new variable as the expression.

Some of the .NET control properties that are also available as Magic xpa properties, such as Location, Size, Enable, and Visible, will not appear in the Properties list. At runtime, if there is a contradiction between the control's properties and Magic xpa properties, Magic xpa properties will be used.

Some of the property values can be written directly or selected from a combo box. Others can be set only by expressions as they expect to receive a .NET object.

Note that you can also use the DNSet() function to change the control properties according to your program logic.

See also How Do I Change the Properties of a .NET Control?

Dataview Control

Defines whether the .NET control operates on the task's data view.

You can bind the task data view to a .NET control (such as a grid control) and use it instead of the built-in Table control. Since there can be many .NET controls on the form, you need to specify which .NET control will show and manage the task data view.

This property is enabled if the DataSource property name property has a value and the DisplayMember property name and ValueMember property name properties do not have a value.

When the value of this property is set to True, you can define the variables that should be seen in the .NET control by zooming into the Dataview Control Fields property.

At runtime a .NET System.Data.DataTable object will be automatically created out of the task data view and this object will be attached to the .NET control’s property that was defined in the DataSource property name property at the model level.

Any modification made to the Magic xpa variables will be automatically reflected in the .NET control and vice versa.

Note: Some grid controls create an additional blank row at the end of the grid. Usually this is governed by a property of the grid control named AllowUserToAddRows. This behavior will create inconsistency between the grid and the Magic xpa task since when the user updates this row, Magic xpa is not aware that a new record is being created, so the task will not be changed to Create mode. To avoid this behavior, it is recommended to set this property to False. Creation of new records can then be done using the Magic xpa Create Line event (F4).

Currently, this functionality is supported in Online tasks only and when the Preload View = Yes.

It is not possible to bind the data view to .NET controls in Batch tasks.

See also How Do I Bind the Data View to a .NET Control?

Since version: 2.3

Dataview Control Fields

Defines the variables that will generate the data source of the control by selecting them from the Variable Columns List.

Since version: 2.3

Reference
Attachment 
Attachment