dashboard-devexpress-dot-dashboardcommon-a9cd722f.md
Specifies types of data fields that can be used for data items in a section.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
[AttributeUsage(AttributeTargets.Property)]
public class SupportedDataTypesAttribute :
Attribute
<AttributeUsage(AttributeTargets.Property)>
Public Class SupportedDataTypesAttribute
Inherits Attribute
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); }
}
//...
}
Imports System.ComponentModel
Imports DevExpress.DashboardCommon
Namespace CustomItemsSample
Public Class CustomFunnelMetadata
Inherits CustomItemMetadata
<DisplayName("Value"), EmptyDataItemPlaceholder("Value"), SupportedDataTypes(DataSourceFieldType.Integer)> _
Public Property Value() As Measure
Get
Return GetPropertyValue(Of Measure)()
End Get
Set(ByVal value As Measure)
SetPropertyValue(value)
End Set
End Property
'...
End Class
End Namespace
Object Attribute SupportedDataTypesAttribute
See Also