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

DashboardConfigurator.SetObjectDataSourceCustomFillService(IObjectDataSourceCustomFillService) Method

Specifies a custom fill service for the DashboardObjectDataSource that provides data for the Web Dashboard.

Namespace: DevExpress.DashboardWeb

Assembly: DevExpress.Dashboard.v19.1.Web.dll

Declaration

public void SetObjectDataSourceCustomFillService(
    IObjectDataSourceCustomFillService objectDataSourceCustomFillService
)

Parameters

Name Type Description
objectDataSourceCustomFillService IObjectDataSourceCustomFillService

An object implementing the IObjectDataSourceCustomFillService interface that specifies a custom fill service for the DashboardObjectDataSource.

Remarks

Important

To learn how to use the DashboardConfigurator‘s API, see the Server-Side API Overview topic.

The IObjectDataSourceCustomFillService 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.

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.

using System.Web.Mvc;

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetObjectDataSourceCustomFillService(IObjectDataSourceCustomFillService) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also