Skip to main content
All docs
V23.2

CustomProperties.SetValue(String, String, Boolean) 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.v23.2.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

public void SetValue(
    string propertyName,
    string propertyValue,
    bool raiseCustomPropertyChanged = true
)

Parameters

Name Type Description
propertyName String

A String that specifies a custom property name.

propertyValue String

Optional Parameters

Name Type Default Description
raiseCustomPropertyChanged Boolean True

true to raise the DashboardCustomPropertyChanged event; otherwise, false.

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