This Blog


Favorite Posts


July 2008 - Posts

  • XtraTreeList: binding to IList<T>

    Holger Flick has just published a great post on using the XtraTreeList and binding it to a standard IList<T>. Pretty clever considering that an IList is a one-dimensional list. So how did he get the hierarchy?

    Check it out.

  • Using the source as documentation

    A common issue we get dinged on is that our official documentation (by "official" I mean, in essence, our help files) is not complete, and that sometimes topics, how-tos and other things are missing. My response to this is: be specific and I can do something about it and get it fixed, but be general and there's nothing I can do but make reassuring noises. (It's like saying the roads in Colorado are awful, well, sure some are, here's the ones I know, but by no means can I extend the specific anecdotes to a general rule.)

    Sometimes I point out that our documentation also encompasses the knowledgebase and the support center and the forums. In an ideal world we'd merge all this data into the help so you wouldn't have to use these online services, but there's always more things to document and so this project gets pushed back. Personally I prefer to use a browser and Google to search for information on our own products (the help is completely online and hence indexed by the search engines). Google has changed permanently what it means to search and the rest of the world is still catching up.

    Another source of documentation -- and it can be said to be the ultimate source, since it can never be wrong --- is the source code itself.

    So here's a specific case that came up this morning on a phone call I had with a customer. He was having an issue with, wait for it, DXValidationProvider. Yeah, I know, you WinForms pros have got this particular component nailed and are nodding your heads sagely, but for me and the customer we were having some issues understanding how it worked.

    If you drop a DXValidationProvider onto the form, you can modify how it validates the values of various controls on the form. There's a smart tag for the component and one of the options is to customize the validation rules. Click it and up comes the following dialog.


    The customer wanted to use the Conditional Validation option. So we clicked it:


    All very well, but what are Value1, Value2, and Values, and what are they used for? The customer was using "Contains" as the ConditionOperator. He wasn't sure what it really meant but was assuming "is contained in the Values collection" was close and had set up the Values collection accordingly. However he was finding that it wasn't working. Go to the help, is what I said. So we did:

    "To create validation rules at design time and associate them with editors, use the 'Customize Validation Rules' editor"

    And that, unfortunately, was that, as regards the help. I did ascertain that ConditionValidationRule was the class I should be interested in, but I couldn't find out very much about it in the help.

    At which point I went to the source. I pulled up DXValidationProvider.cs and browsed. I found the ConditionValidationRule class and it's Validate method looked like this:

    public override bool Validate(Control control, object value) {
    return ValidationHelper.Validate(value, ConditionOperator,
    Value1, Value2, Values, CaseSensitive);

    OK, let's take a look at ValidationHelper. It's in the same file. Its main Validate() method (there were a few overloads) was most informative. I won't repeat it here since the lines are long enough to throw off the blog display, but suffice it to say that it consists of a large switch statement on the ConditionOperator value passed in.

    Most of the code in each case block  makes calls to another set of methods (EvaluateIsBlankOperator is an example). Nevertheless we don't need to look any further than this to get some helpful information about the ConditionOperator, Value1, Value2, and Values, and in fact to answer the customer's actual problem.

    • Equals: checks the control's value against Value1 to be equal
    • NotEquals: the negation of Equals
    • Between: checks the control's value to be between Value1 and Value2
    • NotBetween: the negation of Between
    • Less, Greater, GreaterOrEqual, LessOrEqual: checks the control's value to be less, greater, etc, than Value1
    • BeginsWith: checks whether the control's value begins with Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • EndsWith: checks whether the control's value ends with Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • Contains: checks whether the control's value contains Value1. Both are assumed to be strings. Value1 cannot contain a percent sign.
    • NotContains: the negation of Contains.
    • Like: checks whether the control's value is "like" Value1, that is, Value1 is assumed to contain a text pattern, and the control's value is matched (or not) against that pattern. Metacharacters are '%' for zero or more characters, '_' for a single character. (Note, to find the metacharacters took more time than I took finding the switch statement.)
    • NotLike: the negation of Like.
    • IsBlank: checks whether the control's value as a string is null or empty.
    • IsNotBlank: the negation of IsBlank.
    • AnyOf: checks whether the control's value is one of the values in the Values collection. If the collection is null or empty, the control's value is assumed valid (this seems wrong to me, so I'll ask).
    • NotAnyOf: checks whether the control's value is not one of the values in the Values collection. If the collection is null or empty, the control's value is assumed valid.

    So the basic solution to the customer's issue was to use AnyOf instead of Contains.

    Now, let me lay down some thoughts on this small episode. First of all, I agree that this information should be in the help. No arguments from me on that score.

    The customer could have pinged our support team with this problem and obtained the same answer, albeit a day later.

    And, by the way, I'm certainly not advocating that we don't bother with providing help at all and just ask our support team to always respond with "use the source, Luke".

    Nevertheless, with only a short time browsing the source code (less time than it's taken me to write this blog post), I came up with the answer. I hasten to add that I am not very familiar with the source -- it's not like I read a DevExpress source file every night before switching off the light -- but even so, I was able to unblock someone relatively quickly.

    So, all I'm saying is, if you're stuck on something, maybe browsing the source is one way to find out the answer. I know it's worked for me with .NET in general; so much so, that Reflector is one of my primary tools.

    [General preemptive note: if you find that the help is missing something or is confusing, don't get mad, get even. File a bug report and track it. Don't post it as a comment here: it'll get overlooked or lost. Throw it at the support team, and they'll in turn push it onto the documentation team. Most importantly of all, it'll get registered in our support database and someone will have to do something about it. I won't accept "Accepted - Release TBD" either. Documentation is not code.]

    [Another preemptive note: behave if you want to comment, or I will turn off comments on this post faster than a hot knife through butter. This post has all the hallmarks of attracting anonymous ranters.]

  • Our oldest, but very active, customer

    Dennis in our support team IMed me yesterday in some excitement. "We have the oldest customer!" was the message. I asked for more details. Dennis pointed me to Q180012. I'll quote:

    ...born April 27, 1927. I'm a veteran of 3 wars and was involved in testing atomic bomb effects on Eniwetok and the Nevada Proving Grounds. I've witnessed over 12 blasts from 15 miles away. I was a Navy Chief Petty Officer with the distinction of making chief at a younger age than any. I absolutely love programming. I knew and regularly spent time with Leslie Solomon of MITS Altair fame. In my view you folks make the finest tools in the business but they are also very learning intensive. Keeps my mind young and active I believe.

    It seems that Bud may very well be our oldest customer at 81. And actively programming to boot. I raise my glass to him: that is awesome.

    I'll note in passing that Dennis is one of our youngest support engineers -- I think he's still in his teens...

    Mind you, it's the first time I've heard that our products have a rejuvenating effect alongside their ability to help you create state-of-the-art Windows and web applications. I'll tell you this: I'm instituting a regimen of learning something new about our products every day and maybe I'll live to be a Grand Old Man like Bud.

    And before anyone says "but Julian you are already a grand OLD man", I know where you live.

  • New MS operating systems?

    OK, chalk this one up the the Weird Coincidence Department.

    Last week the news was all about the new Mojave operating system. In essence, Microsoft gathered a group of people with negative impressions of Vista, all of whom were running XP instead, to a meeting where they were individually shown what they were told was a forthcoming new Microsoft operating system, codenamed Mojave. They were then asked for their impressions of it vis-à-vis Windows XP. To a man (or woman) they were highly complimentary about this new operating system and much preferred it to their XP.

    At which point it was revealed that Mojave was nothing more than that reviled Vista.

    This certainly was a fun experiment, and I understand that Microsoft might use the result of it in their promotions in the future.

    Of course, as many people have pointed out, the main reasons that Vista has gained the reputation it has is because of driver issues and underpowered machines, especially in the early days (and I can relate to that, since I removed Vista from my Dell notebook over a year ago now). But now that SP1 is out, the driver issues have largely disappeared, and people have newer faster machines, these are no longer problems we face particularly. And, yes, my desktop runs Vista and my wife's notebook (a year younger than mine) runs Vista perfectly well, Aero and all.

    And then today David Worthington of SDTimes published an in-depth article about a really new and real operating system called Midori (Japanese for "green"). This operating system seems to have grown out of the Singularity operating system, an experiment in writing a managed code OS done by Microsoft Research. Rumors have been slipping out for a little while (see Mary Jo Foley's article for one), but this is the first in-depth discussion I've seen.

    This OS is particularly fascinating. Not only is it all written in managed code, but it's written with concurrency firmly in mind, both task-based and cloud-based (an always-present network is assumed). The managed code means the OS gains better security (no overwrites or memory trashing), something that still causes problems even now. Apparently it's also being designed to run well in a Hyper-V host.

    Midori certainly sounds more intriguing than Mojave, but a caveat is that, if it ever appears at all, it'll be a long way away. Windows 7 it is not.

  • ASP.NET controls: support for stronger, more flexible validation

    There's a product out there for ASP.NET that's been through a few iterations, but that has gained and maintained an impressive reputation for being the best in its field. I remember evaluating it way back when I first started writing ASP.NET applications. In fact it and its brethren were so successful that its writer, Peter Blum, gave up his day job to create and run a company to sell, improve and market them.

    The product I'm referring to here was originally called Professional Validation and More (VAM) and is now part of his Data Entry Suite. VAM took the concept of validators introduced in ASP.NET 1.0 and went wild with them. The most interesting thing for me at this point in time is that these validators are not limited to just the controls Peter provides, but can extend to other ASP.NET controls as well, such as the ones we sell.

    I contacted Peter towards the end of last week wondering if there was anything we could do to help him provide support for our ASP.NET controls with his validators. You know, a nice leisurely contact email. This morning I get an email saying that the support is already completed and will be released in version 4.0.4 of his Data Entry Suite (as part of the DES Validation framework -- the new name for VAM). Wow, that was quick.

    In detail:

    • Support has been added for these controls: ASPxButtonEdit, ASPxCheckBox, ASPxComboBox, ASPxDateEdit, ASPxListBox, ASPxMemo, ASPxRadioButton, ASPxRadioButtonList, ASPxSpinEdit, ASPxTextBox, and ASPxHtmlEditor. Support not only has been added at run-time (well, duh!, that's the whole point Wink), but also at design-time. Cool.
    • Peter's Web Application Updater utility includes our DXperience ASP.NET in its list of supported third party controls. As the user adds DES to their web app, they merely check off "DevExpress 8" and the utility installs the necessary files to use DevExpress' controls with his validators.
    • Client-side and server-side validation is supported.
    • Full documentation is provided on how to use the validators with our controls.
    • You can continue to use ASPxButton to submit a page. Peter provides easy instructions to enable both client- and server-side validation using that control.

    This validates (ho, ho, pun intended) something I've been ruminating on for a while. Much as we'd like to be the only provider of UI controls and frameworks in the world -- cue maniacal laughter à la Dr Evil -- in reality, we have to co-exist with all manner of other third-party products, from databases to controls to frameworks to, as in this case, validators. For those products that don't infringe directly on our specific area of the market, it makes sense for us to support them and to help our customers who are having problems with using both products in the same application. I'll have something more to say about this in the future.

    Anyway, many thanks to Peter Blum for providing this valuable support (over the weekend too!) and, if you own his Data Entry Suite as well as DXperience, I'd recommend asking him for version 4.0.4 right away and get validating.

  • Video: DXperience v2008 vol 2 released

    Earlier on today we released DXperience v2008 vol 2. Loads of great features and enhancements, such as the gauges, the wizard, the improved HTML editor, and so on.


    Coincidence or not? Yesterday afternoon I blogged about the delay in releasing the latest version, and this morning I found this video on my desk, with a note from the cleaners that they'd found it behind the filing cabinet. Scribbled on the label was The DXperience Project, nothing else, no name, nothing.

    It's suddenly gone quiet here in the office.

    Where is everyone? What's going on?


  • Major release on its way

    Something came up today in sales-land, both in a phone call and in a couple of emails.

    "When's v2008 vol 2 going to be released?"

    "Any day now. We discovered a showstopper bug that would affect too many customers, and needed to fix it prior to release."

    "OK, I'll wait until it's released before buying DXperience."

    To which I was stumped. First, DXperience licenses are sold on a subscription basis. All of our .NET products, even if you buy the controls individually, are sold on a subscription basis. If you buy a product today, you will automatically get all minor updates and major upgrades for a full year. That's 365 days in an ordinary year, or 366 days in a leap year. We just don't sell our .NET products in a grab-your-money-and-run basis, and then charge you big bucks for upgrades. We love our customers and we'd like to see them all in a year's time Smile.

    If the showstopper bug were horrendous enough, it could be a week before we get it sorted out (and, yes, heads would roll). Presumably these potential customers are ready right now to use DXperience: I don't think waiting for a week is going to help their development schedules. They can download either the latest full release, v2008.1.6, or the release candidate of v2008.2 and use them immediately, and -- it bears repeating -- because DXperience sells on a subscription basis, they'll get a download link for v2008.2 the moment it's ready. And v2008.3. And v2009.1. And most probably 2009.2 (I don't know what the schedule is for next year -- heck, we're still finalizing what to do for v2008.3).

    The other point to make is that we do have a rock-solid 60-day no-questions-asked money back guarantee. You want to return a product within the first 60 days: we'll give you your money back. Period. Maybe not as a stack of used bills in a leather briefcase, but you get the idea. (OK, I might ask one question: how we failed so badly that you're abandoning us, but you can just ignore me. Not answering is acceptable.) 

    So, in summary, you lose nothing by buying DXperience whenever you've decided you need it. You needn't be constrained by our release schedule or our ability to find showstopper bugs on time. You will get our updates and upgrades for a full year (and, some people even moan that we provide too many Smile) and, by gum, we'll do everything we can through providing great new features and enhancements and world-class support to make sure you renew after that time.

    (And before someone comments that DevExpress is obviously running on empty and need all the cashflow they can get, puh-leaze, give me a break. I'm more concerned that potential customers are artificially putting roadblocks in front of their own development progress.)

  • WPF Datagrid video: using cell templates

    This video explores how to create a cell template for a column in the DXGrid for WPF.


  • WPF Datagrid video: using unbound columns

    Being in the office this week, under Jeff's firm nagging about recording more videos, I can continue the tutorials about using DXGrid for WPF.

    Here's one about how to create an unbound column for the datagrid.


    I note on watching it that I neglected to show that the unbound column is fully supported by the grid's sorting and grouping facilities with no extra code. You just click on the column header to sort on the unbound data, or drag the column header to the group box to group on it. Didn't even think about this at the time, sigh.

  • WinForms Scheduler: setting up a toolbar and ribbon

    I quickly recorded a couple of videos this morning on setting up a toolbar or a ribbon tab to quickly and easily select the various views in a scheduler control.

    Both the ViewSelector and the RibbonViewSelector are DXperience-level composite controls since they use features that are not part of XtraScheduler (in particular they're part of XtraBars). So you'll need DXperience WinForms, Enterprise, or Universal to emulate the work done in the videos.

    The first video describes how to set up and use the ViewSelector:


    The second video describes how to set up and use the RibbonViewSelector:


    Before anyone comments that there's nothing particularly new here, let me say that these have been on my todo list for a while and I'm glad to have finally got them done.

2 3

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