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.

How to "unset" a GridStyleInfo member (e.g., "BackColor" or "TextColor")?

Thread ID:





34555 Sep 12,2005 03:59 PM Sep 13,2005 09:56 AM Windows Forms 2
Tags: GridControl
Ken Overton
Asked On September 12, 2005 03:59 PM

I have sets of GridStyleInfo objects that operate as "user styles" -- in various grid event handlers I use GridStyleInfo.ModifyStyle() to apply user styles based on policy. But what if I want to "clear" a parameter (not the whole style) so that it no longer gets added in when I call ModifyStyle()? Right now I''m still clobbering fields when I set them to, e.g., Color.Empty or Color.Transparent. But this problem is not limited to color fields.

Administrator [Syncfusion]
Replied On September 13, 2005 09:19 AM

Hi, You can use the reset methods conditionally in the style object. For eg: For reseting the backcolor the syntax is as follows, style.ResetBackColor(); Regards, Leo.

Ken Overton
Replied On September 13, 2005 09:56 AM

Thanks, that did the trick!


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.