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. Image for the cookie policy date

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

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.

2 Replies

AD Administrator Syncfusion Team September 13, 2005 01:19 PM UTC

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.


KO Ken Overton September 13, 2005 01:56 PM UTC

Thanks, that did the trick!

Loader.
Live Chat Icon For mobile
Up arrow icon