All docs
V21.1
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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.v21.1.Core.dll

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 Item - Scale Breaks
Chart Item - 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 Item - 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 Create Custom Properties article for details.

See Also