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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

23129 Jan 5,2005 02:28 PM UTC Jan 5,2005 03:34 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 5, 2005 02:28 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

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.

Warning Icon 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.Close Icon

;