# PropertyConfig This configuration contains all configurations for the given property type on the table. ## Configuration methods ### SetDisplayName Sets the title displayed in the table header and edit dialog. ```c# PropertyConfigurator SetDisplayName(string displayName) ``` - **Parameters:** - `displayName`: The display name for the property. - **Returns:** `PropertyConfigurator` ### List Determines if the property should appear in the table, if not the property is also set to be not searchable. ```c# PropertyConfigurator List(bool list) ``` - **Parameters:** - `list`: A boolean value to set if the property should appear in the table. - **Returns:** `PropertyConfigurator` ### IsSortable Determines if the table can be sorted by the property. ```c# PropertyConfigurator IsSortable(bool sortable) ``` - **Parameters:** - `sortable`: A boolean value to set if the property is sortable. - **Returns:** `PropertyConfigurator` ### IsSearchable Determines if the property get taken into account for search results. ```c# PropertyConfigurator IsSearchable(bool searchable) ``` - **Parameters:** - `searchable`: A boolean value to set if the property is searchable. - **Returns:** `PropertyConfigurator` ### SetDisplayedProperty Determines if the value that should be displayed instead of the string representation of the type. ```c# PropertyConfigurator SetDisplayedProperty(Expression> propertyExpression) ``` - **Type Parameters:** - `TInnerProp`: The inner property type to display. - **Parameters:** - `propertyExpression`: The expression to determine the property. - **Returns:** `PropertyConfigurator` ### Format (Synchronous) Determines the value that's displayed in the admin UI. ```c# PropertyConfigurator Format(Func formatter) ``` - **Parameters:** - `formatter`: The function to format the value. - **Returns:** `PropertyConfigurator` - **See Also:** [](#setdisplayedproperty) ### Format (Asynchronous) Determines the value that's displayed in the admin UI. ```c# PropertyConfigurator Format(Func> formatter) ``` - **Parameters:** - `formatter`: The function to format the value. - **Returns:** `PropertyConfigurator` ### FormatEach (Synchronous) Determines the value that's displayed for each entry in the list. ```c# PropertyConfigurator FormatEach(Func formatter) ``` - **Parameters:** - `formatter`: The function to format the value for each entry. - **Returns:** `PropertyConfigurator` ### FormatEach (Asynchronous) Determines the value that's displayed for each entry in the list. ```c# PropertyConfigurator FormatEach(Func> formatter) ``` - **Parameters:** - `formatter`: The function to format the value for each entry. - **Returns:** `PropertyConfigurator` ### SetParser (Synchronous) Determines the function used for parsing the value provided in the editor dialog to the actual property value. ```c# PropertyConfigurator SetParser(Func parser) ``` - **Parameters:** - `parser`: The function to parse the value. - **Returns:** `PropertyConfigurator` ### SetParser (Asynchronous) Determines the function used for parsing the value provided in the editor dialog to the actual property value. ```c# PropertyConfigurator SetParser(Func> parser) ``` - **Parameters:** - `parser`: The function to parse the value. - **Returns:** `PropertyConfigurator` ### SetEditable Determines if the value can be edited in the admin UI. If true, the value can still be initially set, but not modified. ```c# PropertyConfigurator SetEditable(bool editable) ``` - **Parameters:** - `editable`: A boolean value to set if the property is editable. - **Returns:** `PropertyConfigurator` ### SetCreatable Determines if the initial value can be edited in the admin UI. If true the value will not be visible in the create dialog. ```c# PropertyConfigurator SetCreatable(bool creatable) ``` - **Parameters:** - `creatable`: A boolean value to set if the property is creatable. - **Returns:** `PropertyConfigurator` ### DisplayValue Determines if the value should be displayed in the admin UI (useful for secrets like passwords etc.). ```c# PropertyConfigurator DisplayValue(bool display) ``` - **Parameters:** - `display`: A boolean value to set if the property value is displayed. - **Returns:** `PropertyConfigurator` ### IsTextArea Determines if the admin UI should use a text area for modifying the value. ```c# PropertyConfigurator IsTextArea(bool textField) ``` - **Parameters:** - `textField`: A boolean value to set if the property is a text area. - **Returns:** `PropertyConfigurator` ### SetTextAreaRows Determines the initial size of the text area field. ```c# PropertyConfigurator SetTextAreaRows(int rows) ``` - **Parameters:** - `rows`: The number of rows for the text area. - **Returns:** `PropertyConfigurator` ### SetValidator (Synchronous) Determines the validator used for the property value before saving. ```c# PropertyConfigurator SetValidator(Func> validator) ``` - **Parameters:** - `validator`: The function to validate the property value. - **Returns:** `PropertyConfigurator` ### SetValidator (Asynchronous) Determines the validator used for the property value before saving. ```c# PropertyConfigurator SetValidator(Func>> validator) ``` - **Parameters:** - `validator`: The function to validate the property value. - **Returns:** `PropertyConfigurator` ### SetOrderIndex Determines the order index for the property in the admin UI. ```c# PropertyConfigurator SetOrderIndex(int index) ``` - **Parameters:** - `index`: The order index for the property. - **Returns:** `PropertyConfigurator` - **See Also:** [](TableConfig.md#setorderindex) ### SetDisplayLength Sets the maximum character length displayed in the admin UI (not in the editor dialog). ```c# PropertyConfigurator SetDisplayLength(int maxLength) ``` - **Parameters:** - `maxLength`: The maximum length of characters to be displayed. - **Returns:** `PropertyConfigurator` ### ForceRelation Forces a property to be treated as a relation. ```c# PropertyConfigurator ForceRelation(bool isEnumerable = false, bool isRequired = true) ``` - **Parameters:** - `isEnumerable`: Determines if it is possible to assign multiple objects to the property. - `isRequired`: Determines if the property is nullable. - **Returns:** `PropertyConfigurator`