Ticket S31520
Visible to All Users

Data Binding - Chart must throw an exception when it detects a wrong or missing Data Member after a DataSource is assigned

created 16 years ago

Take a look at this code (from the attached example):

C#
chartControl1.SeriesDataMember = "Name"; chartControl1.SeriesTemplate.ArgumentDataMember = "Hour"; chartControl1.SeriesTemplate.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Numerical; chartControl1.SeriesTemplate.ValueDataMembers.AddRange("Count"); chartControl1.DataSource = table; // data members are reset here

ArgumentDataMember is NOT a numeric type and it's silently reset when the DataSource is assigned. As the result, the chart is empty, and it's very difficult to troubleshoot this situation.
Proposed Solution:
Throw an exception, when you detect incorrectly assigned data members. The exception message must make it clear which ~DataMember property has a wrong value and why.

Answers

created 16 years ago

Hello,
We're glad to inform you that this feature has been implemented in the next major version of the XtraCharts suite (v2009 vol 1). Now, an exception will be generated at runtime if a data source doesn't contain any of the data members used in the chart control, or these data members are incompatible with its scale type.
PS. Note that v2009 vol 1 will be available later this year.
Thanks, George.
R&D, .net Team.

    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.