Blogs

News

Favorite Posts

ctodx

Discussions, news and rants from the CTO of Developer Express, Julian M Bucknall

Breaking change for v2007 vol 2.2 (aka 7.2.2)

     

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.

Published Jul 30 2007, 06:33 PM by Julian Bucknall (DevExpress)
Technorati tags: Breaking changes, v2007.2
Bookmark and Share

Comments

 

Douglas Clutter said:

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

August 3, 2007 2:26 AM
 

Mehul Harry (DevExpress) said:

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.

August 3, 2007 7:28 AM
 

Patrick said:

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.

August 7, 2007 9:06 AM
 

Patrick Connelly said:

Apparently there is another breaking change.

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

August 7, 2007 9:10 AM
 

Alan Evans said:

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.

November 18, 2007 7:57 AM

About Julian Bucknall (DevExpress)

Julian is the Chief Technology Officer at Developer Express. You can reach him directly at julianb@devexpress.com. You can also follow him on Twitter with the ID JMBucknall.
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.