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.

Changing the Icon for color picker

Thread ID:

Created:

Updated:

Platform:

Replies:

61498 May 28,2007 03:01 AM May 28,2007 06:25 AM Windows Forms 1
loading
Tags: GridControl
Faheem Rauf
Asked On May 28, 2007 03:01 AM

Hi, A cell type Color Picker in virtual grid has a default button icon “@”, can you please guide me how I can change it.
Regard,
Thanks

Administrator [Syncfusion]
Replied On May 28, 2007 06:25 AM

Hi Ali,

You will have to create a custom celltype by deriving the control. It requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell.

In the Renderer part you have to set the DropDownButton.Text to whatever you want.


public class GridDropDownColorUICellRenderer1: GridDropDownCellRenderer
{
ColorUIControl colorUI;

public GridDropDownColorUICellRenderer1(GridControlBase grid, GridCellModelBase cellModel)
: base(grid, cellModel)
{
DropDownButton = new GridCellButton(this);
DropDownButton.Text = "**";//"@"
}
}

Here is a small sample:
http://websamples.syncfusion.com/samples/Grid.Windows/I61498/main.htm

Kindly let us know if this helps.

Best Regards,
Jeba.

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.

;