ServiceLookupEditorBaseAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Base class for service lookup based editor types.
[AttributeUsage(AttributeTargets.All)]
public abstract class ServiceLookupEditorBaseAttribute : CustomEditorAttribute
| parameter | description |
|---|---|
| editorType | Type of the editor. |
Public Members
| name | description |
|---|---|
| ActionName { get; set; } | Gets / sets the action name, e.g. List / ListLookup etc. to use. If this is null, the service will be determined from the endpoint's ListLookup or List actions, or defaults to "List" method if no endpoint is available. |
| AutoComplete { get; set; } | Allows dynamically creating new options from text input by the user in the search box. This option should only be used for free text inputs, not ID / Text pairs. When this option is enabled, InplaceAdd cannot be used. A newly created option will have the same ID / Text as the user-entered text. |
| Capabilities { get; set; } | Gets or sets the supported ListRequest capabilities. When not explicitly set, capabilities are inferred from the endpoint when possible. |
| CascadeField { get; set; } | Cascade filtering field (items will be filtered on this key, e.g. CountryID) |
| CascadeFrom { get; set; } | ID (can be relative) of the editor that this editor will cascade from, e.g. Country. |
| CascadeValue { get; set; } | Cascade filtering value, usually set by the CascadeFrom editor, e.g. the integer value of CountryID. If null or empty, and CascadeField is set, all items are filtered. |
| ColumnSelection { get; set; } | Column selection, defaults to KeyOnly. |
| ContainsField { get; set; } | Gets or sets the containsField option. |
| Delimited { get; set; } | Use comma separated string instead of an array to serialize values. |
| DialogType { get; set; } | This property is meaningful when InplaceAdd is true. By default, the dialog type name is determined by the service, e.g. if the service is "Northwind/CustomerCity/List", a dialog class named "Northwind.CustomerCityDialog" is used. If the dialog type is different than the service, set this to the class name, e.g. "MyModule.MyDialog". |
| EndpointType { get; set; } | Gets or sets the endpoint type. If this is set, the service URL will be determined from the endpoint's route using ActionName method, or List or ListLookup actions if ActionName is not set. |
| ExcludeColumns { get; set; } | Exclude columns list. |
| FilterField { get; set; } | Optional filtering field (items will be filtered on this key, e.g. GroupID) |
| FilterValue { get; set; } | Optional filtering value, e.g. the integer value of GroupID. If null or empty string no filtering occurs. |
| IconField { get; set; } | Name of the icon field. |
| IdField { get; set; } | Name of the ID field. |
| IncludeColumns { get; set; } | Include columns list, defaults to ID, text, and [LookupInclude] columns. |
| IncludeDeleted { get; set; } | Include deleted, defaults to false. Only effective when the current user has the undelete permission for the target entity. |
| InplaceAdd { get; set; } | Enables inplace add / edit functionality. |
| InplaceAddPermission { get; set; } | Permission required to use inplace add / edit. |
| ItemType { get; set; } | Gets or sets the item/row type passed to the constructor. |
| MinimumResultsForSearch { get; set; } | The minimum number of results that must be initially (after opening the dropdown for the first time) populated in order to keep the search field. This is useful for cases where local data is used with just a few results, in which case the search box is not very useful and wastes screen space. The option can be set to a negative value to permanently hide the search field. |
| Multiple { get; set; } | Allow multiple selection. Make sure your field is a List. You may also set CommaSeparated to use a string field. |
| OpenDialogAsPanel { get; set; } | Opens dialogs as a panel (default value is null, which uses the panel attribute on the dialog class). |
| PageSize { get; set; } | Page size used while loading records, default 100. |
| Service { get; set; } | List service URL, e.g. Northwind/Customer/List. It can be an absolute or relative URL to ~/Services. |
| Sort { get; set; } | Sort order for records, defaults to the text field. |
| TextField { get; set; } | Name of the text field. |
Protected Members
| name | description |
|---|---|
| ServiceLookupEditorBaseAttribute(…) | Base class for service lookup based editor types. |
Remarks
Initializes a new instance of the ServiceLookupEditorBaseAttribute class.
See Also
- class CustomEditorAttribute
- Source: ServiceLookupEditorBaseAttribute.cs