We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Always use same layout

Thread ID:

Created:

Updated:

Platform:

Replies:

39047 Dec 23,2005 08:21 AM Dec 25,2005 11:45 PM Windows Forms 1
loading
Tags: GridControl
Krijn Michiels
Asked On December 23, 2005 08:21 AM

Hi Wich is the best way to ensure that all UI components look the same ? I have a custom GDBG but the BaseStyleMap gets always serialized when I drop my grid on a form or control. I tried ShouldSerializeBaseStylesMap (return False) but this didn''t work. The GDBG serializes too much code in the parent container wich makes later changes difficult without editing every form/usercontrol.

stanleyj [Syncfusion]
Replied On December 25, 2005 11:45 PM

Hi Krijn, This serialization to code can be avoided by overriding the respective properties and set it to DesignerSerializationVisibility.Hidden. As an example RangeStyles being serialized to code can be avoided by overriding RangeStyles and set it to DesignerSerializationVisibility.Hidden. C# [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new GridRangeStyleCollection RangeStyles { get { return base.RangeStyles; } set { base.RangeStyles = value; } } VB Public Shadows Property RangeStyles() As GridRangeStyleCollection Get Return MyBase.RangeStyles End Get Set MyBase.RangeStyles = Value End Set End Property Same with RowHeightEntries and ColWidthEntries. Let me know if your requirement is different. Best regards, Stanley

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;