This Blog


Favorite Posts


July 2007 - Posts

  • System.Data breaking changes in latest .NET Framework update

    UPDATE: The Program Manager at Microsoft in charge of this area of the .NET Framework has confirmed that this was a bug, and that it will be fixed in the next update.

    We've noticed some breaking changes in the System.Data assembly, version 2.0.50727.1378, changes that will affect the way the XtraGrid works when adding new records. This is the version that gets installed with Visual Studio 2008 beta 2.

    Suppose we have the following code (where the event handlers also log their execution):

      CurrencyManager manager = GetCurrencyManager(CreateView());
    manager.CurrentChanged += new EventHandler(manager_CurrentChanged);
    manager.ListChanged += new System.ComponentModel.ListChangedEventHandler(manager_ListChanged);
    manager.CurrentItemChanged += new EventHandler(manager_CurrentItemChanged);
    manager.ItemChanged += new ItemChangedEventHandler(manager_ItemChanged);



    With the old version of System.Data, we would get this output:

      0: ===Add
    1: ItemChanged e.Index:-1
    2: ListChanged ItemAdded - old:-1, new:100
    3: CurrentChanged
    4: CurrentItemChanged
    5: ===End
    6: CurrentItemChanged
    7: ItemChanged e.Index:-1
    8: ListChanged ItemAdded - old:-1, new:100

    With this latest version of System.Data, we get this instead:

      0: ===Add
    1: ItemChanged e.Index:-1
    2: ListChanged ItemAdded - old:-1, new:100
    3: CurrentChanged
    4: CurrentItemChanged
    5: ===End

    As you can easliy see there are no longer any events fired with EndCurrentEdit(). This is hugely problematic since there is no chance to find out when the adding of the current row has been completed.

    As it happens, we can handle the new behavior when all the data operations are made through the grid and data controller (we are in control, of course), but in many cases our customers will make direct calls through the DataView or through the CurrencyManager instance. In this latter scenario, the DataController and real DataView will lose synchronization and have different views of the universe, causing unknown and unforeseen problems.

    (Note that although I'm only talking about XtraGrid here, it's likely that this issue will affect other controls and applications as well, as well as other grid controls.)

    We are in touch with Microsoft's CLR team to try and resolve this issue.

  • 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.

  • Show us more skin, baby

    It seems our principal graphics designer had some spare time on his hands recently (we're obviously not working him hard enough -- soon change that, laughing evilly), and decided to create two new skins, green and pink, for the Office 2007 look-and-feel fans out there. Here's the pink one:

    You can download them from our Downloads page (go to the bottom of the page to find the download link and also an image of both skins).

    To use the new skins, you must first add a reference to the downloaded assembly to your project. At this point they're available to you at design-time.

    To make them available at run-time, you need to add one line to your code to register the assembly:



    Probably the best place for this is in the method that initializes the components on the main form.


  • The seat of your Gantts

    I suppose there are two main reasons for talking about Gantt charts in XtraCharts: the first is about breadth of functionality and the other is about elegance; although in the end we found that having to encapsulate the breadth of functionality also meant thinking about and encompassing elegance.

    Hmm, that sounds a bit wishy-washy, so let me illustrate. When we wrote the Gantt charts in XtraCharts, we wanted to create something that could stand alongside Microsoft Project, not just be an ordinary range chart that happened to have arrows between ranges.

    So that meant embodying the whole concept of time in the chart. We needed to indicate "today". We needed to be able to show not only projected or budgeted time, but also elapsed time. And not only time: we also needed to encapsulate the notion of dependency between items so that we could draw connecting arrows properly.

    Take a look at this simple Gantt chart.

    Although the data it shows is not that interesting (after all it shows a waterfall view of development, natch), take a moment to look at the various components of the chart, especially with attention to the visual detail.

    First thing to realize is that the background of the charts is low contrast. The background shows a grid of lines, but it doesn't hit you over the head with it. The lines are there and can certainly be discerned, however they're just not that important compared with the information the actual chart is showing and so they blend into the background.

    Second thing to notice is how we've incorporated the notion of time passing. There's a thin line indicating "today". Each different project has two pieces of information that are displayed: the projected time as a brown bar and the elapsed time as a green, thinner bar superimposed on the brown bar. Both of these colored bars are not painted in flat colors, but as gradients to give that subtle 3D look. It doesn't look like much, but believe me, these days your users will appreciate this effect. They might not be able to articulate exactly why they'd prefer a gradient to a flat look, but prefer it they will.

    Now look at the two different ways we're showing dependencies. First of all the "Feature Planning" task must complete before the three features are started. Note how the three arrows descend from a single line in order to reduce visual noise for information that's insignificant. Finally note how the final task of all, "Testing and Bug Fixing", only takes place after the features are all done and so all the arrows join into one. It is attention to detail like this that we feel differentiates our charting product from our competitors.

    This attention to detail is everywhere in XtraCharts. I'll be pointing it out in further blog posts as I discuss some of the other new features.

  • For z-axis challenged charts, more scrolling and zooming

    Of course, as soon as I start talking about some of the new features in XtraCharts, I can guarantee I'll leave somethng out. And so it was with Zooming and Scrolling. I was so taken with the 3D charting functionality that I forgot about mentioning the 2D charts and their support for zooming and scrolling.

    This is, in some ways, just as it should be: I wouldn't be here nattering about XtraCharts if all I could talk about were our pie charts. Anyway, in 2D-land user interaction with charts is just as compelling as with 3D charts (wlthough notice it has been present for a while).

    First of all here's a step line chart.

    Notice that there's a scrollbar along the bottom of the chart: the graph is so wide that it does not fit in the width of the window. The scrollbar has a thumb that is equal to the proportion of the window width to the entire chart. You can scroll the chart left and right either by using this scrollbar, or, easier, by using the same click-and-grab action on the chart as you could with the 3D charts.

    And zooming is just as easy: use the mouse wheel. Roll back to zoom out, roll forward to zoom in. You can also use the shift key in combination with the mouse: press shift, click the left mouse button, and then drag a region. That region then occupies the entire window.

    If you zoom in, oc course, it's likely that the vertical axis will also get a scrollbar to indicate that you can scroll up and down as well as left and right.

    So, again, your users gain more control over the presentation and use of your charts, and in very intuitive ways.

    Next time: Gantt charts for sure.

  • Give your users control of your 3D charts

    Last week I sat down with the XtraCharts developers in order to have a discussion about why they're so jazzed about the new chart enhancements in DXperience v2007 vol 2. All I can say is they certainly have a reason to be excited; sitting down with them has infected me with their enthusiasm as well. This latest version has so upped the ante versus other chart products that it's going to be hard to catch up.

    What I'll do is talk about the enhancements in three or maybe four blog posts. In this one, I'll talk about scrolling and zooming in the 3D charts.

    To be honest I thought this was going to be a gimmick. Who the heck would need 3D charts that respond to user interaction? A chart is a chart is an image. OK, zooming I can make a case for, but scrolling? Well, having tried it out, just count me converted. Interactive graphs are the way forward, a boon to your users, and XtraCharts makes implementing this functionality painless in your WinForms applications.

    First of all there's the zoom feature. If you have a complex graph to view, being able to zoom in on the detail is priceless. Perhaps you're not bothered about the part of the chart over there, but are really interested in this part here. Using the mouse wheel you can zoom in and out remarkably easily. First the original chart:

    Now the chart zoomed:

    (Note: it's amazing how intuitive this was for me. No one told me this was how it worked, but nevertheless I naturally used the mouse wheel to do the zooming. I certainly didn't right-click and look for a Zoom option in the context menu, for example.)

    Second, there's the scrolling feature. Now, agreed, in XtraCharts we now have transparency for our 3D charts. Suppose we have one of the new 3D Area charts: we can define the transparency value for the series so that we can "see through" the nearest chart to those further away.

    This of course helps us understand the series that are partially obscured. Nevertheless, I find myself wanting to turn the chart around a little bit so that I can see those obscured parts of the data series that are behind. Well, now you can: in a WinForms application, the mouse cursor changes into an open hand when you hover over the chart: simply "grab" part of the chart (the cursor changes to a closed fist) and move the mouse to cause the chart to rotate and scroll. After a bit of practice, you can rotate the chart to show exactly the right view.

    And what's even more is that XtraCharts doesn't just treat the chart as a 3D object: it makes sure that, no matter how you rotate the chart, the planes showing the axes are always "behind" the chart; they never obscure the actual data.

    Now, I'll admit that this interactive zooming and scrolling of 3D charts only works with WinForms applications, and it certainly takes some processing power to generate a fluid and responsive display. (I run a Core 2 Duo, and when I rotate and zoom, the CPU speed shifts into high gear and the CPU usage revs into the red.)

    For ASP.NET, XtraCharts generates an image of the chart on the server and then sends that to the browser. The chart is static. Although you could do some work to make charts interactive in the browser, the immediate feedback won't be there since, for every angle or zoom level, XtraCharts has to generate another image to send. But we're looking into what we can do for this type of functionality in a future version.

    So, all in all, a nice big thumbs up for 3D zooming and scrolling. It puts some real power in the hands of your users at virtually no cost to you, the developer.

    Next time I'll talk a bit about Gantt charts and of the improvements there.

  • The end of the beginning of the forums

    Despite our early issues with implementing the new forum software (the switchover was -- and I'm using my typical British understatement here -- not optimal), things have settled down.

    I'll be the first to admit that the transfer was not the best of experiences, either for you, our customers, or us. We woefully underestimated the hardware needed, we didn't properly test the NNTP access, and we pulled the switch without any warning (even to some of our own teams). Many of you have properly complained and justifiably so. Let me just say that we certainly won't be doing that again any time soon. In fact, ever. We have better things to do with our support team.

    There are still a few minor issues — if I never see "<" or ">" in a post subject again it will be too soon — but for the majority of our customers, whether they use the web or NNTP to access the forums, it all works pretty well. Of course, if you are suffering from one of these minor issues, it's going to be anything but minor, but we are committed to working on solving these remaining problems. And hence we've officially made the decision not to switch back to the "old" newsgroups.

    Nonetheless, we're still not 100% happy, especially with NNTP access. I don't know whether it's the breadth of newsgroup readers that our customers are using or their sophistication in using those readers, but we're finding some interesting bugs in the NNTP server add-in for Community Server. We're submitting bug reports and waiting for the bug fixes and, although Telligent is responsive, it all takes time. So we're planning on continuing some work we were doing earlier on writing our own NNTP add-in for Community Server. No timeframe — duh! — but I can guarantee this: if we get as far as deployment, we'll be doing some in-depth testing by running the add-ins in parallel.

    And that's a promise.

  • More breaking changes - eek!

    Although I blogged about breaking changes a little while ago, now we're on the eve of release I have a few more to talk about with regard to DXperience v2007 vol 2. It seems that the recent Release Candidate was so well received and tested by our Enterprise customers that we had to make a couple more changes (or, more likely, I forgot to mention them earlier).


    The following obsolete members were removed.

    • AxisRange.Min property: use AxisRange.MinValue or AxisRange.MinValueInternal properties instead
    • AxisRange.Max property: use AxisRange.MaxValue or AxisRange.MaxValueInternal properties instead
    • AxisRange.SetMinMax method: use AxisRange.SetMinMaxValues or AxisRange.SetInternalMinMaxValues methods instead


    The default value of the Brick.Value property now equals String.Empty (like the XRControl.Tag property)

    ASPxperience Suite

    All container controls now have the EnableHierarchyRecreation property, which is set to false by default. This means that a control's inner structure will not be reset when the view state is refreshed. This fixes a bug that caused controls embedded into containers to lose their settings (for example, see issue AQ14141).

    You have nothing to worry about if you aren't changing the layout of controls within a container via code; your old code will work just as before. If, however, you do change the inner hierarchy within a container control, you will need to set the EnableHierarchyRecreation property to true so that the control layout is rebuilt. In this case, you will have to use workaround code, as described in the issue mentioned above.


Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383


DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, Delphi, HTML5 or iOS & Android development. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2018 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners