Back to Devexpress

DashboardViewer.CustomDBCommandInterceptor Property

dashboard-devexpress-dot-dashboardwin-dot-dashboardviewer-3ef69866.md

latest2.6 KB
Original Source

DashboardViewer.CustomDBCommandInterceptor Property

Specifies the IDBCommandInterceptor object for the Dashboard Viewer control.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
[Browsable(false)]
[DefaultValue(null)]
public IDBCommandInterceptor CustomDBCommandInterceptor { get; set; }
vb
<DefaultValue(Nothing)>
<Browsable(False)>
Public Property CustomDBCommandInterceptor As IDBCommandInterceptor

Property Value

TypeDefaultDescription
IDBCommandInterceptornull

An IDBCommandInterceptor object.

|

Remarks

Dashboard controls execute a variety of SQL statements against the database. Implement IDBCommandInterceptor to intercept these data source commands. You can suppress a command or modify the execution algorithm.

Example: Dashboard for WinForms - Override the Default Isolation Level

The following example shows how to override the default isolation level (READ COMMITTED) in a specific query. The change allows users to retrieve information without being locked by another process that modifies the same data. This can significantly reduce the query time.

  1. Implement the IDBCommandInterceptor interface (NolockInterceptor.cs in this example). Call the IDBCommandInterceptor.CommandCreated(String, IDbCommand) method and specify CommandText to execute.

  2. Assign the NolockInterceptor object to the CustomDBCommandInterceptor property.

Implements

CustomDBCommandInterceptor

See Also

DashboardViewer Class

DashboardViewer Members

DevExpress.DashboardWin Namespace