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

ColorEdit customisation

Is there any way to customise the drop down that appears for the ColorEdit cell type? I would like to remove the palette and system tabs (i.e. leave the 'known colors' tab.

Also, can i disable typing into the 'edit' part of the cell (i.e. only allow changing of the color using the drop down color chooser, not by typing into the cell).

Thanks.

1 Reply

RA Rajagopal Syncfusion Team May 29, 2007 09:14 PM UTC

Hi Mitul,

You need to create a custom celltype to do this. The ColorUIControl of the GridDropDownColorUICellRenderer is private. To have only the StandardColors in the color edit cell's drop down ColorUIControl, we can have our own DropDownColorUICellRenderer. Here is a sample which displays only the StandardColors using a custom cell type called MyColorEdit.

To avoid typing into the cell, you can handle the TableControlCurrentCellStartEditing event and set e.Inner.Cancel = true.

Here is a sample download link http://websamples.syncfusion.com/samples/Grid.Windows/F61575/main.htm

Regards,
Rajagopal

Loader.
Live Chat Icon For mobile
Up arrow icon