Skip to content

DevExpress-Examples/asp-net-mvc-dashboard-underlying-widgets-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dashboard for MVC - How to access API of underlying widgets

The following example shows how to customize options of underlying widgets in ASP.NET MVC.

Use the ViewerApiExtension.on and ViewerApiExtension.off methods to subscribe and unsubscribe from the events.

The Web Dashboard renders an underlying widget as follows:

  1. The Web Dashboard loads the widget’s default configuration.

    The onItemWidgetOptionsPrepared event is raised. Handle this event to customize the DevExtreme widget’s options before the widget is rendered.

  2. The Web Dashboard renders the UI component with the configured options.

    The onItemWidgetCreated event is raised. It occurs once for each UI component when the dashboard is loaded to the client. You can use this event to customize the UI component instance.

  3. The UI component is updated (for example, when you apply filters or change parameter values).

    The onItemWidgetUpdated event is raised. It occurs every time the UI component should be re-rendered.

The customized options are listed below:

  • The hovered grid row is highlighted in the underlying dxDataGrid.
  • A standard tooltip that appears when a user hovers over a chart's series point is disabled.
  • A custom tooltip appears when a user clicks a label on the chart's argument axis. The onArgumentAxisClick property executes a function that invokes the custom tooltip.
  • The animation is enabled for the dxChart and dxPieChart UI components.
  • The dxPieChart UI component displays a legend.
  • The font weight and an interval between major ticks are modified in the dxCircularGauge UI component.

Files to Review

Documentation

More Examples