You can easily achieve this using our ControlExtensions:
IsDesignMode - static method which determines whether the control is in Sitefinity design mode - you are editing a page. There are also IsPreviewMode- determines whether the control is in Sitefinity preview mode.
IsBackend -determines whether a control instance is in backend. Please refer to the sample code below:
.IsDesignMode() && !
Please could you provide an up to date link for GridSample.rar. Also, I already have a masterpage used as a template for Sitefinity. Do I need to create a new masterpage, used by my user control, or use the existing one?