The requested page is not available for the requested platform. You are viewing the content for Default platform.

How to: Access API of Underlying Widgets in the MVC Viewer


This documentation applies to v16.2. Starting with v17.1, the ASPxDashboardViewer control is in maintenance mode. In v19.1, the new Web Dashboard Control replaces the old Web Dashboard Viewer. This means that the Web Dashboard Viewer will not be included in our installation packages. See our blog post for more information.

Refer to the following KB articles to learn how to migrate to ASPxDashboard / ASP.NET MVC Dashboard:

This example demonstrates how to customize client widgets used to visualize data within dashboard items at runtime using ASPxClientDashboardViewer's API.

The following options are changed:

@model DevExpress.DashboardWeb.Mvc.DashboardSourceModel
@Html.DevExpress().DashboardViewer(settings => {
    settings.Name = "DashboardViewer";
    settings.CallbackRouteValues = new { Controller = "Home", Action = "DashboardViewerPartial" };
    settings.ExportRouteValues = new { Controller = "Home", Action = "DashboardViewerPartialExport" };
    settings.ClientSideEvents.ItemWidgetCreated = "function(s, e) { customizeWidgets(e); }";
    settings.ClientSideEvents.ItemWidgetUpdated = "function(s, e) { customizeWidgets(e); }";
    settings.ClientSideEvents.ItemWidgetUpdating = "function(s, e) { unsubscribeFromEvents(e); }";
    settings.Width = 1200;
See Also