Skip to main content
All docs
V20.2

CustomProperties.SetValue(String, String) Method

Records or clears a custom property value. This method doesn’t save your action to the Dashboard Designer’s history.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v20.2.Core.dll

NuGet Packages: DevExpress.Dashboard.Core, DevExpress.WindowsDesktop.Dashboard.Core

Declaration

public void SetValue(
    string propertyName,
    string propertyValue
)

Parameters

Name Type Description
propertyName String

A String that specifies a custom property name.

propertyValue String

A String that specifies a custom property value.

Remarks

You can add a new property or update an existing property’s value in the dashboard definition. Custom properties are stored in the CustomProperties collection in a structured format. Each custom property in this collection contains the custom property’s unique name and value.

The following table lists the levels and corresponding properties used to access the collection at this level:

Level to apply Description Property Example
Dashboard Stores custom data related to the dashboard. Dashboard.CustomProperties Dashboard description
Dashboard item Stores custom data related to a particular dashboard item. DashboardItem.CustomProperties Chart - Scale break
Chart - Constant line
Data item container Stores custom data related to the Grid’s columns, the Chart’s series and other elements of a dashboard item. DataItemContainer.CustomProperties Grid - Fixed (Pinned) columns

The code snippet below saves a new value for the DashboardDescription property:

designer.Dashboard.CustomProperties.SetValue("DashboardDescription", "New custom description");

The custom property’s value is stored as a string. For example, a dashboard XML file stores the DashboardDescription property at the dashboard’s level. The property’s value is used as the dashboard’s description.

<Dashboard>
...
    <CustomProperties>
        <DashboardDescription>This dashboard shows statistics on sales of bicycles, related equipment and accessories. ...</DashboardDescription>
    </CustomProperties>
</Dashboard>

To clear a custom property value, pass null to the CustomProperties.SetValue method.

The following code snippet clears the value of the DashboardDescription property:

designer.Dashboard.CustomProperties.SetValue("DashboardDescription", null);

Refer to the Custom Properties topic for details.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SetValue(String, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also