Skip to main content
A newer version of this page is available. .

IObjectDataSourceCustomFillService Interface

Allows you to implement a custom fill service for the DashboardObjectDataSource.

Namespace: DevExpress.DashboardCommon

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

NuGet Packages: DevExpress.Dashboard.Core, DevExpress.WindowsDesktop.Dashboard.Core

Declaration

public interface IObjectDataSourceCustomFillService

Remarks

The custom fill service allows you to get access to the DashboardObjectDataSource data (data fields used in a dashboard, the filter expression, parameters and their actual values) and use it in the current data query.

Call the default configurator’s DashboardConfigurator.SetObjectDataSourceCustomFillService(IObjectDataSourceCustomFillService) method to assign this service to the Web Dashboard control.

To provide a custom fill service for the DashboardObjectDataSource, implement the IObjectDataSourceCustomFillService.GetData method where you can obtain object data source’s data before you send it to a dashboard.

Note that the IObjectDataSourceCustomFillService is executed if you use typeof() to specify the ObjectDataSource.DataSource property:

DashboardObjectDataSource objDataSource = new DashboardObjectDataSource("Object Data Source", typeof(SalesPersonData));

Example

This example shows how to bind the ASP.NET MVC Dashboard extension to the Object Data Source and supply it with data using a custom fill service by implementing a IObjectDataSourceCustomFillService interface.

You can use the custom fill service (IObjectDataSourceCustomFillService to get access to the DashboardObjectDataSource data (data fields used in a dashboard, the filter expression, parameters and their actual values) and use it in the current data query.

The IObjectDataSourceCustomFillService is executed if you use typeof() to specify the ObjectDataSource.DataSource property.

In this example, the ObjectDataSourceFillParameters.DataFields parameter is used to load data only for required fields.

View Example

using System.Web.Mvc;

namespace MVCxDashboard_CustomFillService.Controllers
{
    public class HomeController : Controller
    {
        // GET: Home
        public ActionResult Index()
        {
            return View();
        }
    }
}
See Also