How to get a property from a particular style

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?

4 Replies

MS Michael Scott November 18, 2005 07:24 PM UTC

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


AD Administrator Syncfusion Team November 18, 2005 11:46 PM UTC

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;


MS Michael Scott November 30, 2005 12:17 AM UTC

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


AD Administrator Syncfusion Team November 30, 2005 12:54 AM UTC

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

Loader.
Up arrow icon