Breaking change for v2007 vol 2.2 (aka 7.2.2)

30 July 2007

In v2007 vol 2.2, we've fixed a problem with inconsistent values being passed to the LookUpEdit.CustomDisplayText event. In fixing the problem, we were forced to change the signature of the BaseEdit.CustomDisplayText event (and the matching RepositoryItem.CustomDisplayText event) and the signature of a corresponding event handler class. We apologize for any inconvenience caused, but as I say, this breaking change was the simplest course of action we could take in this case.

If you used this event in your application, building the project after an upgrade to v2007 vol 2.2 will produce errors that must be fixed manually. The WinForms team prepared these tips that will allow you to fix this issue.

Breaking changes

First of all, here's a list of what's changed:

  1. The CustomDisplayText event now takes a CustomDisplayTextEventArgs object as a parameter (in prior versions, it took a ConvertEditValueEventArgs object).
  2. To set the display text, you must now use the e.DisplayText property (in prior versions, you used the e.Value property instead)
  3. There is no longer any Handled parameter in the CustomDisplayTextEventArgs object.

Strategy for fixing errors

After upgrading, you must do the following to resolve the compilation problems with the CustomDisplayText event:

1. First of all, locate the code used to subscribe to the CustomDisplayText event. In C#, it'll look something like this:

    buttonEdit1.CustomDisplayText += 
new DevExpress.XtraEditors.Controls.ConvertEditValueEventHandler(this.buttonEdit1_CustomDisplayText);

You'll need to replace the ConvertEditValueEventHandler delegate with the CustomDisplayTextEventHandler delegate:

    buttonEdit1.CustomDisplayText += 
new DevExpress.XtraEditors.Controls.CustomDisplayTextEventHandler(this.buttonEdit1_CustomDisplayText);

2. Second, locate your CustomDisplayText event handler, which takes a ConvertEditValueEventArgs parameter:

    private void buttonEdit1_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e) {

Replace the event's ConvertEditValueEventArgs parameter with the ConvertEditValueEventArgs class:

    private void buttonEdit2_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e) {

3. Third, instead of specifying custom display text via the e.Value parameter, you should use the e.DisplayText parameter. For instance, if you used the following code to change the display text:

    e.Value = "'" + e.Value + "'";

you should replace it as follows:

    e.DisplayText = "'" + e.Value + "'";

4. Finally, you should remove any code statements that reference the e.Handled parameter as it's no longer available.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Douglas Clutter
Douglas Clutter

Julian - There appears to be a few other breaking changes that need manual intervention.  Here's what I've found so far:

DevExpress.Web.ASPxDataControls.v7.2.dll appears to be gone.  The controls that were here appear to be in ASPxEditors.v7.2 now?

To fix, I've removed references to the DLL in Web.config, the project References folder, and the top of many ASPX pages.

Also needed to change the using statements from:

 using DevExpress.Web.ASPxDataControls;

to just

 using DevExpress.Web;

I also needed to manually change several references to DevExpress.Web.ASPxDataControls.controlname to be DevExpress.Web.ASPxEditors.controlname.

As yet, I can't even find ASPxDropDownList and ASPxButton.

Thanks, Doug

3 August 2007
Mehul Harry (DevExpress)
Mehul Harry (DevExpress)

Hi Dougas,

You're right in removing those references. Basically, ASPxGrid & Editors shouldn't have been inside v7.2.1. This problem is fixed now in v7.2.2.

ASPxDataControls is part of ASPxGrid & Editors Library. So I recommend you use v7.1.5 for anything ASPxGrid related .

ASPxButton will be available in a future 2007 release. ASPxDropDownList is now the ASPxComboBox.

Thanks and nice debugging.

3 August 2007

Your step #2 is incorrect.

You have:

"Replace the event's ConvertEditValueEventArgs parameter with the ConvertEditValueEventArgs class"

That should be:

Replace the event's ConvertEditValueEventArgs parameter with the CustomDisplayTextEventArgs class.

7 August 2007
Patrick Connelly

Apparently there is another breaking change.

xtraChart.AxisY.Range.Min and Max have changed to MinValue and MaxValue

7 August 2007
Alan Evans

Mmmm....I've only been using DevExpress components for a little while, having moved over from Infragistics. Can't say I'm that impressed having to change all my existing code because DevExpress just suddenly decide to change control names on a whim, especially when up against deadlines.

18 November 2007

Please login or register to post comments.