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

Transparent color for control

When i choose transparent color from a color edit the framework throws an exception saying that this color is not supported by the control. To solve this i set this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); But even then i get a error...How do i fix this

1 Reply

AD Administrator Syncfusion Team February 24, 2005 09:30 AM UTC

The GridControl has a public property that allows this, this.gridControl1.SupportsTransparentBackColor = true; The GridDataBoundGrid does not. But as indicated, you can derive the GridDataBoundGrid and set a style property in the constructor to enable this. public class MyGridDataBoundGrid : GridDataBoundGrid { public MyGridDataBoundGrid() : base() { this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); } } But if you are trying to use TransparentBackColor in an editing cell control, this is not supported as this control is based on a RichTextBox that does not support transparency.

Live Chat Icon For mobile
Up arrow icon