Smart Combo Editor
Sample Markup
<!-- With Smart Value Lists --> <smart-combo-editor smart-value-list="Demo-Color" [(smartModel)]="selected.Color"></smart-combo-editor> <!-- Smart Data Source style --> <smart-combo-editor smart-business-entity-name="Consultingwerk.SmartComponentsDemo.OERA.Sports2000.SalesRepBusinessEntity" smart-entity-table="eSalesrep" display-column-name="RepName" key-column-name="RepName" [smart-field-binding]="{ RepName: 'RepName' }" [(smartModel)]="selected.eSalesrep[0].RepName" [smart-combo-allow-filter]="false"> </smart-combo-editor>
Description
Attribute | Description |
---|---|
smart-value-list | The name of the Smart Value List to get values from. |
value-list-pair | An array containing pairs of elements to display and their values. Example: ["A", "1", "B", "2"] will produce a combo editor with two items, A and B. When A is selected, the value that will be set is 1. |
value-list | An array of elements to display. When using this settings, the values will match the displayed text. Example: ["A","B"] will produce a combo editor with two items. When A is selected, the value that will be set is A. |
smart-business-entity-name | The business entity that the Smart Combo Editor's Smart Data Source will use. |
smart-entity-table | The business entity table to be used as a table-ref by the Smart Combo Editor's internal data source. |
display-column-name | The name of the column that the Smart Combo Editor will use to display records. |
key-column-name | The the name of the field that the Smart Combo Editor will use to update the smartModel value when the user selects an item. |
[(smartModel)] | Used for two-way data binding for the Smart Combo Editor. Use just as you would use the native ngModel attribute. |
smart-field-binding | Used to bind additional fields to from the Combo Editor's internal data source to an external object. |
smart-flag-value | The flag is an additional item which will be prepended before the items in the value-list / value-list-pair / smart-value-list array. The flag-value can be anything, for instance it can be "All" or "Please select a SalesRep". |
smart-flag-label | The text which will be displayed for the flag item. This is requested in case of using value-list-pair. |
smart-flag-image | The path for the image of the flag item. This is requested in case of using smart-value-list. |
smart-foreign-fields | This setting can be used together with the queryString option, in order to filter the data source for a data-driven Smart Combo Editor. There can be multiple foreignFields, divided by commas (Example: "Name,SalesRep"). |
smart-query-string | This option is used to filter the data-driven Smart Combo Editor's data source. It can be used as a simple query, or together with the foreignFields option, like in the example below:
where @Name@ will be replaced by the foreign field value in the Smart Viewer. |
provide-foreign-field-value | The name of a callback method implemented in the form, that can be used to modify the value of a given foreignField. It takes as an input parameter a ProvideForeignFieldValue instance. The value property should be altered directly on the input parameter. |
smart-combo-allow-filter | Enables/disables filtering in the Smart Combo Editor input. The default value is true. |