How do I set color of a PushButton in a cell?

Hi. I try to set the color of a PushButton in a cell in the essential grid. It is the fore color itself I wish to set. But the only Color I can set is the BackColor (provided by GridStyleInfo). I use XP themed buttons. Will I need to override GridCellButton and the approptiate Renderer to perform such an operation? Regards, Benny

1 Reply

AD Administrator Syncfusion Team January 5, 2005 03:34 PM UTC

There are no property settings for this. The only only color our grid supports for a PushButton is through the Themed setting. If you set style.ThemesEnabled for that cell (or grid.ThemesEnabled for the whole grid), then the grid should draw a Themed button, and the themes will control the button color. One way you can set a button color is to create a new Windows Forms Button and set its color. Then you can set the style.CellType = "Control" and set style.Control to be the button instance. If neither using themes or style.Control=button1 work for you, then you would have to derive a cell type and handle things yourself. You can look at the grid\samples\indepth\cellbuttons sample. Its EllipsisCell celltype is an example of a bitmap button that you could then use as any color you wanted.

Loader.
Up arrow icon