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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Always use same layout

Thread ID:





39047 Dec 23,2005 01:21 PM UTC Dec 26,2005 04:45 AM UTC WinForms 1
Tags: GridControl
Krijn Michiels
Asked On December 23, 2005 01:21 PM UTC

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 26, 2005 04:45 AM UTC

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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon