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 get a property from a particular style

Thread ID:

Created:

Updated:

Platform:

Replies:

37305 Nov 18,2005 02:16 PM Nov 29,2005 07:54 PM Windows Forms 4
loading
Tags: GridControl
Michael Scott
Asked On November 18, 2005 02:16 PM

I''d like to get specific properties from a pre-defined style (like the "BackColor" of the style "Row Header"), so I can set that property to a particular cell. I didn''t find how to access that kind of thing in the PDF file, nor in the MSDN help pages. How do I do that?

Michael Scott
Replied On November 18, 2005 02:24 PM

Or perhaps the better solution is to turn off the Gradient Style for the row/colum header styles.

Administrator [Syncfusion]
Replied On November 18, 2005 06:46 PM

If this is a GridControl (where you can set properties cell by cell), you can use code like this to get the gradient from the row header. this.gridControl1[4,2].Interior = this.gridControl1.BaseStylesMap["Row Header"].StyleInfo.Interior;

Michael Scott
Replied On November 29, 2005 07:17 PM

What I''m looking for is something like : gridControlConfMatrix.RowStyles[rows].Interior.ForeColor = gridControlConfMatrix.RowStyles[rows].Interior.BackColor; or : gridControlConfMatrix.ColStyles[cols].Interior.GradientStyle = "None"; Bottom line - I want a cell to mimic ONLY the background color of a cell with the style "Row Header" or "Col Header" Michael

Administrator [Syncfusion]
Replied On November 29, 2005 07:54 PM

Instead of trying to set the style.Interior property, directly set the style.BackColor property. This should override the previously set Interior property.

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.

;