Skip to main content
All docs
V24.2

Custom Item Troubleshooting

  • 6 minutes to read

The article describes how to resolve possible issues when you create or integrate a custom item into your project.

Metadata Issues

Data Sections are not Displayed in the Data Items Pane

You created data item sections in metadata, but they are not displayed in the UI.

How to Solve This Issue

  • Ensure that each data section is a public property in metadata.
  • Ensure that each data section property has the Measure/Dimension or MeasureCollection/DimensionCollection type.

A Dashboard Control does not Update Metadata Changes in the UI

You changed or deleted a data item in the UI, but the custom item still displays old data.

How to Solve This Issue

  • Make sure that you correctly declared metadata properties.
  • Ensure that the Measure and Dimension property declarations include the GetPropertyValue and SetPropertyValue methods.

    public Measure Value {
            get { return GetPropertyValue<Measure>(); }
            set { SetPropertyValue(value); }
    }
    
  • Make sure that Measure and Dimension collections are readonly.

    public DimensionCollection Arguments { get; } = new DimensionCollection();
    

Interactivity Issues

Master Filtering does not Synchronize with the Maximized Custom Item State

The selected custom item element is unselected when you maximize the custom item.

How to Solve This Issue

Make sure that the SetSelection method is called, and the control’s elements are selected in this method.

For example, the following code updates a custom control according to the current master filter selection for the custom Funnel item:

protected override void SetSelection(CustomItemSelection selection){
    chart.ClearSelection();
    foreach (DashboardFlatDataSourceRow item in selection.GetDashboardFlatDataSourceRows(flatData))
        chart.SelectedItems.Add(item);
}

Master Filter State does not Synchronize with the Master Filter or Drill-Down Selection

When you use a custom item to filter a dashboard item, the filter is applied but the custom item element is unselected.

How to Solve This Issue

  • Make sure the SetSelection method is called and you manage the control’s element selection in the SetSelection method.

  • Make sure that methods in which you implement master filtering and drill-down logic are called, and you pass the correct parameters to the SetMasterFilter or PerformDrillDown method.

Ribbon Bars Issues

Custom Item Bars are not Displayed in the Ribbon

Custom item bars are not displayed in the UI.

How to Solve This Issue

Custom Item Icon is not Displayed in the Ribbon

A custom item button does not display its icon.

How to Solve This Issue

  • Make sure that the icon file’s Build Action property is set to Embedded Resource.

    win-custom-item-icon-build-action-property

  • If the icon is in the same assembly where the CustomItemMetadata object is defined, make sure that the correct file path is passed as an argument to the CustomItemImageAttribute constructor. Call the Assembly.GetManifestResourceNames method to return the names of all resources in the assembly.
  • If the icon is in another assembly, pass both the icon’s file path and any class type from the assembly where the file is located to the CustomItemImageAttribute constructor.

Master Filter and Drill-Down Buttons are not Displayed in the Ribbon

Master Filter and Drill-Down buttons are not displayed in the Ribbon’s Data page for a custom item.

How to Solve This Issue

Make sure that you apply SupportInteractivityAttribute to the interactive Dimension property in metadata.

Visualization Issues

The CustomDashboardItemControlCreating Event does not Occur

The event does not occur when a dashboard control visualizes a custom item.

How to Solve This Issue

Make sure that you registered metadata for the corresponding custom item in the CustomItemMetadataTypes collection.

Dashboard Item Configuration Error Occurs When You Create a Custom Item in the UI

The CustomDashboardItemConfigurationException is raised and the following message appears:

Dashboard item configuration error. Please contact the application vendor or system administrator for assistance.

win-custom-item-configuration-error

How to Solve This Issue

Catch CustomDashboardItemConfigurationException to obtain the description of possible issues.

Custom Control does not Synchronize with Data Item State

A custom control that visualizes a custom item does not update custom item data once you change it in the UI.

How to Solve This Issue

Make sure that the UpdateControl method is called when a custom item’s data or settings change. Update all properties and objects initialized in the method and ensure that the custom control uses them.

For example, the following code binds a custom Sankey chart item to data:

protected override void UpdateControl(CustomItemData customItemData) {
    multiDimensionalData = customItemData.GetMultiDimensionalData();
    flatData = customItemData.GetFlatData(new DashboardFlatDataSourceOptions() { AddColoringColumns = true, AddDisplayTextColumns = true });
    ClearBindings(); 
    SetDataBindings(flatData);
}

void ClearBindings() {
    sankey.DataSource = null;
    sankey.Colorizer = null;
    sankey.SourceDataMember = null;
    sankey.TargetDataMember = null;
    sankey.WeightDataMember = null;
}
void SetDataBindings(DashboardFlatDataSource flatData) {
    sankey.SourceDataMember = flatData.GetDisplayTextColumn(dashboardItem.Metadata.Source.UniqueId).Name;
    sankey.TargetDataMember = flatData.GetDisplayTextColumn(dashboardItem.Metadata.Target.UniqueId).Name;
    if(dashboardItem.Metadata.Weight != null)
        sankey.WeightDataMember = dashboardItem.Metadata.Weight.UniqueId;
    try {
        sankey.DataSource = flatData;
    } catch {
        sankey.DataSource = null;
    }
}

Data Formatting Issues

Possible Issues

The GUID is shown instead of “Others”
When you enable Top N with the Show “Others” value option, the GUID is displayed in a custom item instead of “Others” value.
Group Intervals display unformatted values
Numeric values ​​or unformatted DateTime values are shown instead of Group Intervals (such as Quarter, Month, Year-Quarter, and so on).
Measure formatting is not applied
Custom item data contains unformatted measure values.

How to Solve These Issues

The DashboardFlatDataSource object contains data columns with unformatted measure and dimension values. You can use display text columns to visualize formatted values in the resulting custom item’s view. Replace data item values with their display text and visualize it in a custom item. To accomplish this, refer to detailed description in the following methods:

Catch the CustomDashboardItemConfigurationException Exception

Catch CustomDashboardItemConfigurationException to identify which errors have occurred during dashboard initialization.

You can do it in the following ways:

  • Use the Visual Studio Exception Settings dialog.

    1. Check the Common Language Runtime Exceptions check box in Exception Settings:

      Enable Common Language Runtime Exceptions

    2. Deselect the Enable Just My Code option:

      Deselect Just My Code

    The exception occurs when you run the application:

    CustomDashboardItemConfigurationException

  • Handle the FirstChanceException event.

    To catch CustomDashboardItemConfigurationException in code, handle the AppDomain.FirstChanceException event at application start:

    using System.Runtime.ExceptionServices;
    // ...
    static void Main(){
        AppDomain.CurrentDomain.FirstChanceException += CurrentDomain_FirstChanceException;
        // ... 
        Application.Run(new Form1());
    }
    private static void CurrentDomain_FirstChanceException(object sender, FirstChanceExceptionEventArgs e){
    }
    

    The following window shows the exception message:

    handle FirstChanceException