Skip to main content
All docs
V23.2

SupportedDataTypesAttribute Class

Specifies types of data fields that can be used for data items in a section.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

[AttributeUsage(AttributeTargets.Property)]
public class SupportedDataTypesAttribute :
    Attribute

Remarks

You can apply SupportedDataTypesAttribute to a data section when you create metadata for a custom dashboard item. The attribute identifies the data field type that a user can add to a section.

To specify the data field type, pass one of the DataSourceFieldType enumeration values as an argument to the SupportedDataTypesAttribute constructor.

The following code snippet specifies that data items in the Value section should have the integer type. As a result, you can add only an integer data field in this section.

using System.ComponentModel;
using DevExpress.DashboardCommon;

namespace CustomItemsSample {
  public class CustomFunnelMetadata : CustomItemMetadata {
    [DisplayName("Value"),
    EmptyDataItemPlaceholder("Value"),
    SupportedDataTypes(DataSourceFieldType.Integer)]
    public Measure Value
    {
        get { return GetPropertyValue<Measure>(); }
        set { SetPropertyValue(value); }
    }
    //...
}

Inheritance

Object
Attribute
SupportedDataTypesAttribute
See Also