4.6 KiB
TableConfig
This configuration contains all configurations for the given table type.
Configuration methods
Ignore
Determines if the table should be ignored in the admin UI.
TableConfigurator<TModel> Ignore(bool ignore)
-
Parameters:
ignore: A boolean value to set if the table should be ignored.
-
Returns:
TableConfigurator<TModel>
Property (With configurator)
Configures the property of the table using the provided configurator.
TableConfigurator<TModel> Property<TProp>(Expression<Func<TModel, TProp>> propertyExpression, Action<PropertyConfigurator<TProp>> configurator)
-
Parameters:
propertyExpression: Used for determining the property.configurator: Used for configuring the property.
-
Returns:
TableConfigurator<TModel>
Property (Without configurator)
Configures the property of the table.
PropertyConfigurator<TProp> Property<TProp>(Expression<Func<TModel, TProp>> propertyExpression)
-
Parameters:
propertyExpression: Used for determining the property.
-
Returns:
PropertyConfigurator<TProp>
AddVirtualProperty (With configurator)
Adds a virtual property to the table view and configures it using the provided configurator (this property will not appear in the editor).
TableConfigurator<TModel> AddVirtualProperty(string name, Func<TModel, IServiceProvider, string> template, Action<PropertyConfigurator<string>> configurator)
-
Parameters:
name: The name of the virtual property.template: The template used for generating the property value.configurator: Used for configuring the virtual property.
-
Returns:
TableConfigurator<TModel>
AddVirtualProperty (Synchronous)
Adds a virtual property to the table view (this property will not appear in the editor).
PropertyConfigurator<string> AddVirtualProperty(string name, Func<TModel, IServiceProvider, string> template)
-
Parameters:
name: The name of the virtual property.template: The template used for generating the property value.
-
Returns:
PropertyConfigurator<string>
AddVirtualProperty (Asynchronous)
Adds a virtual property to the table view (this property will not appear in the editor).
PropertyConfigurator<string> AddVirtualProperty(string name, Func<TModel, IServiceProvider, Task<string>> template)
-
Parameters:
name: The name of the virtual property.template: The template used for generating the property value.
-
Returns:
PropertyConfigurator<string>
SetDisplayName
Determines the name for the table used in the admin UI and URL for the table page.
TableConfigurator<TModel> SetDisplayName(string name)
-
Parameters:
name: The display name for the table.
-
Returns:
TableConfigurator<TModel>
SetDescription
Determines the description displayed in the admin UI.
TableConfigurator<TModel> SetDescription(string description)
-
Parameters:
description: The description for the table.
-
Returns:
TableConfigurator<TModel>
SetOrderIndex
Determines the order index for the table in the admin UI.
TableConfigurator<TModel> SetOrderIndex(int index)
SetViewPolicy
Determines the policy needed by a user in order to view the table.
TableConfigurator<TModel> SetViewPolicy(string policy)
-
Parameters:
policy: The view policy string.
-
Returns:
TableConfigurator<TModel>
SetUpdatePolicy
Determines the policy needed by a user in order to edit the entries.
TableConfigurator<TModel> SetUpdatePolicy(string policy)
-
Parameters:
policy: The update policy string.
-
Returns:
TableConfigurator<TModel>
SetCreatePolicy
Determines the policy needed by a user in order to create entries.
TableConfigurator<TModel> SetCreatePolicy(string policy)
-
Parameters:
policy: The create policy string.
-
Returns:
TableConfigurator<TModel>
SetDeletePolicy
Determines the policy needed by a user in order to delete entries.
TableConfigurator<TModel> SetDeletePolicy(string policy)
-
Parameters:
policy: The delete policy string.
-
Returns:
TableConfigurator<TModel>