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

How to: Bind ASPxDashboard to an Object Data Source and Provide Data using DataLoading

  • 3 min to read

In this example, the ObjectDataSource.DataSource property specifies the type of a data class. The actual data for this data source is provided by handling the ASPxDashboard.DataLoading event.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebDesigner_DataLoading.Default" %>

<%@ Register Assembly="DevExpress.Dashboard.v16.2.Web, Version=16.2.1.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.DashboardWeb" TagPrefix="dx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="position: absolute; left: 0; right: 0; top:0; bottom:0;">
        <dx:ASPxDashboard ID="ASPxDashboard1" runat="server" Width="100%" Height="100%" 
            ondataloading="ASPxDashboard1_DataLoading"></dx:ASPxDashboard>
    </div>
    </form>
</body>
</html>