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. Image for the cookie policy date
close icon

Changing the Icon for color picker

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

1 Reply

AD Administrator Syncfusion Team May 28, 2007 10:25 AM UTC

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.

Loader.
Live Chat Icon For mobile
Up arrow icon