One feature I really like in Telerik’s WinForms RadGrid control is the ability to save and load layout information using the Serialization API.  It’s nice to be able to to persist appearance and other settings in XML format, so that they can be restored later and provide a more consistent feel for the user.

Telerik’s Knowledge Base has a great article here on how to use the API to persist selected property values. This is quite useful if, instead of using the default values which store many many grid settings, you only want to store a few settings.  There’s even ...

Today, Falafel Software released the latest edition of its successful courseware material of TestComplete for the new 7.0 version.  The courseware contains several new editions in many chapters and new chapters for Keyword Testing, one of the most exciting new features of TestComplete 7, and Web Testing as well.  The book can be purchased on Lulu and it comes in spiral binding format for ease of use during labs and script exercises.  The book is used as the main material for all TestComplete trainings (online, onsite & Summit) in the USA, Europe and Australia.

For more information about TestComplete training ...

If you are using conditional directives in your C# code, you know that you can't set a breakpoint on any code within the directives using Visual Studio. Thankfully, you can add a breakpoint programmatically:

#if  MYSYMBOL
#if DEBUG
System.Diagnostics.Debugger.Break();
#endif
DoSomethingForMySymbol();
#else
#if DEBUG
System.Diagnostics.Debugger.Break();
#endif
DoSomethingForEverythingElse();
#endif

System.Diagnostics.Debugger.Break() can only be called in Debug mode, so make sure you wrap it in a #if DEBUG check first. Good luck!

  


Here's a handy little tip for those of you using DataGrids or something similar, for instance, the Telerik RadGrid control. If you want to allow the user to double-click on a row to do something (edit the row, for example), implement the CellDoubleClick event handler for the grid and put your code in there.

If you do this, then double-clicks in the column header will also fire the event; this can happen if a user clicks the header too quickly while trying to sort. To prevent this, add code to check e.RowIndex. If the user double-clicked on a header, e.RowIndex ...
When programming for Windows, you'll sometimes want a container object (a form, a panel, etc.) to handle certain events, such as MouseOver, MouseMove, MouseUp, MouseDown, etc. But what happens if you have other controls in the container? You could write event handlers for each of those controls, but that seems like a lot of duplication of effort.

One solution to this problem is to send the child control's events that you'd like to capture to the event handlers of the container, e.g.
childControl.MouseMove += new MouseEventHandler(ParentControl_MouseMove);
This will send the event to the correct handler, but there is a ...