Combo control is used to select a value from a fixed or dynamically changing list. When not in use control displays item in a single column. Control also provides a drop down window displaying multiple columns.
Extended search feature can be used for even faster data selection. It is possible to sort data or to search by any of the displayed columns. It is also possible to define filter which is then used to present the data. Values can also be entered in the text edit section of the control. While entering value, an auto complete function is started suggesting possible values to the user.
Null values can be entered in the control simply by clicking the Null button.
Which field is displayed and which field is used for passing values to other controls is defined with control’s properties. 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. |
DropDownAdapter | Defines the MxAdapter component from which data sources and fields are available for manipulation when using drop down lists. |
DropDownDataSourceName | Defines the data source from which the fields will be used to display and manipulate data when using drop down lists. |
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. |
ValueMember | Defines the field which represents the currently selected record in the control. |
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. |
NullButton | Defines the appearance of null button in the control. |
NullText | Defines the text displayed when the control has null value assigned. |
RefreshButton | Defines the appearance of the refresh button in the control. |
SearchButton | Defines the appearance of the search button in the control. |
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 the Combo control open MxSpace solution project in Visual Studio. In Solution Explorer expand node Parts and double click ArticlesPart.cs. See the control in section Filter.
To implement Combo control
- In Solution Explorer open MxPart component (ArticlesPart) and add Combo control from the Toolbox to the desired location on the canvas.
- From the Toolbox add the desired predefined MxAdapter component (ArticlesAdapter) which will provide data for the Combo control.
- Select Combo control and open Property Window.
- In property DropDownAdapter select the desired MxAdapter component (articlesAdapter1).
- In property DropDownDataSourceName select the data source (ArticlesCategories) that will provide the data.
- In property ValueMember select the field (Id) whose value will represent selected record and will be passed to other data sources as a parameter.
- In property DisplayMember select the field (Name) whose value will be displayed in the control.
- In order to pass the selected value to other data source statements define parameter mapping element in property Parameters.
MxPart
AdvancedText