Breaking Change T889848
Visible to All Users

The DiagramControl now uses IListSource to obtain data from a DataTable source

What Changed

Starting with v20.2, the DiagramControl uses the IListSource.GetList method to obtain data from all sources that implement the IListSource interface.

Reasons for Change

In previous versions, the DiagramControl's data binding engine prioritized the IEnumerable interface over the IListSource. This issue prevented data update notifications for data sources that implement both interfaces (for instance, TypedTableBase).

Impact on Existing Apps

This change affects the data type of a diagram item when the DiagramControl is bound to a DataTable source. The code snippet below illustrates this scenario.

C#
void DataController_GenerateItem(object sender, DiagramGenerateItemEventArgs e) {             DataRow row = (DataRow)e.DataObject; ///code }

In this scenario, convert the DataObject type to the DataRowView instead.

C#
void DataController_GenerateItem(object sender, DiagramGenerateItemEventArgs e) {             DataRowView row = (DataRowView)e.DataObject; ///code }

How to Revert to Previous Behavior

Set the DevExpress.Xpf.Core.CompatibilitySettings.PrioritizeIListSourceInDiagramDataBinding static property to false to revert to the previous behavior.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.