100% DX – SearchLookUpEdit, did YOU know it existed ?


Normally when I need to present a complex lookup I would spawn a new form have the user select a row from a carefully crafted UI and return the single value result back to a combo style element on my main form. When less complicated lookup’s are required a drop down list with concatenated fields may have sufficed, but not anymore…

In the midst of a recent sprint I found myself needing a little more. The task at hand was to provide an easy way to select a job from a collection (currently around 2000 entries and growing), the problem was not everyone would want to use a single field, they may not know the job name. Some users would be more comfortable with the claim number, or the client name. Enter the XtraEditors.SearchLookupEdit control.

I almost tripped over this control whilst trolling through the extensive collection of items in my toolbox. The name intrigued me so I decided to investigate a little further and was surprised at the power this little guy punched.

In a nutshell it is a container with a grid, text field and button, but don’t be fooled, I found it to be fast, quick to configure and simple to implement. For me the steps were;

1. Add SearchLookUpEdit control to form
2. Bind to existing datasource (and specify field as return value)
3. Adjust column properties (keeping UI noise to a minimum)
4. Tweak a few specific appearance properties (finding the drop down width was a pain)
5. Hookup an event
6. Test

Because you can control all aspects of appearance you can pretty much make the style fit any WinForm design.

The power comes from the ‘out-of-the-box’ features on the control, users can filter, search, group, select columns etc and all without chewing up valuable screen real-estate. I know that from now on I’ll be looking to use the SearchLookUpEdit control in more places, and it taught me not to undervalue some of the ‘smaller’ common controls at my disposal.

(Picture taken from DevExpress website, my use of the control contain confidential data).

100% DX – CodeRush replaces ReSharper


The debate as to CodeRush or ReSharper has been undertaken by many people of the years, in fact prior to writing this post, I read through a number of older comparisons which put forth good arguments for both camps.

For me, it is part of the 100% DX campaign.

For years I was an avid user of CodeRush & Refactor! Pro (from here on the combination of products will just be referred to as CodeRush), but colleagues continued to rave about ReSharper. At the time I wanted to get more feedback on my code style so I decided to give ReSharper a go.

Initially I found the memory usage on ReSharper better than I was experiencing with CodeRush, the UI a little less ‘in your face’, but even after a month of experimenting with all the features, I was still becoming frustrated and getting ‘tripped up’ and therefore slowed down when trying to do basic text editing. Constantly being told that code the Visual Studio IDE had generated (click events etc) was not complying to the best practices was also annoying. The intelli-sense interaction was lacking, templates and code-gen cumbersome to setup.

So I decided to switch back to CodeRush. Now I understand not everyone thinks the high visibility UI is a good move, but I like the fact that things stand out when I want them to. Templates and Drop Markers are a heaven send, and the refactoring functionality gets a regular workout. For example, being able to type ‘CC’ and have a constructor created with the relevant parameters is great, I can select which items from my class I want to include and bam.. the code is there.

The CodeRush training window ensures I have context sensitive help through the learning curve.

But for me, the real time saver is templates. One of my co-workers once called me a ‘Template Whore’, I have set up a large number of custom routines that save hours of coding. It takes a little bit of time to get used to the myriad of options you can use, but persevere, you will make your time back ten fold.

Finally, but by no means least is the Refactor! Pro functionality. I love a refactor session after some hardcore development, and the features available make streamlining my codebase a pleasure not a chore.

Simple things like extracting code into a new method is simple:

If you have not yet tried CodeRush and Refactor! Pro, then I highly recommend you head over to DevExpress and download a trial copy, you won’t be disappointed.