Button control is used for triggering actions that execute a data flow or some other business logic; statement execution of complicated business logic implemented with workflow. The action is always triggered manually by the user. It is also possible to define security policy for each button thus preventing misuse of the application.
The main feature of MxButton control is the possibility to implement more than one button on the same control. Multiple buttons can then be accessed via drop down list. The appearance and the behaviour of the button control are specified in Context Navigation of the MxPart.
Design Properties
Property in this section makes the control undoubtedly recognizable on the MxPart so its functionality can be defined in Context Navigation.
Property | Description |
---|---|
Name | Defines the name of the control or the component. |
NOTE: Properties described here are related exclusively to Mx Controls. For the description of other properties please see Developer Express documentation.
Security
For every button it is possible to define security on all standard security entities. This way it is possible to define security for individual user or for a group of users.
To define security for a button
- Run MX-Client.
- Login using user account with administrative or security privileges.
- Open the user interface containing the button.
- Click the down arrow on the button and select Manage Security option.
- Select the button for which you wish to configure security.
- In security window, select the button name in Securable Items section.
- Select the desired security entity and check Allow or Deny square appropriately.
The defined security takes effect next time the user is logged in the application.
Example (MxSpace)
To see the implementation of Button control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click StockPart.cs. See the button control Add in section Editing.
To implement Button control
- In Solution Explorer open MxPart component (StockPart) and add Button control from the Toolbox to the desired location on the canvas.
- Open Property Window and enter desired value (AddQuantityButton) in the Name property.
- Right click ContextNavigation on the part and select option Run Designer.
- Right click in Domain Menu Explorer section and select Add Context Menu option.
- In the newly created context menu (Hidden) click Properties node.
- In the Domain Menu Editor section select the name of the button in property Target.
- Right click Pages node in Domain Menu Explorer section and select Add Context Page option.
- Right click newly created node and add the desired menu (Add Adapter Menu). The menu reflects in the button as one of the options in button drop down list. Any number of menus can be created.
Once a menu is created it is possible to define every one of its properties. Properties determine button’s functionality, the name of the button, the icon representing it, data binding, etc. To learn more about navigation and its properties see chapter Navigation.