Draw color swatch in cell

Hi, In the ColorEdit cell, the color selected covers the whole cell. Rather than this, I would like to have the color swatch on the left and its text on the right. Is it possible? YS

3 Replies

AD Administrator Syncfusion Team November 23, 2005 11:01 AM UTC

One way you can do this is to derive the COlorEdit cellrenderer/cellmodel classes, and tweak the implementation there. Overriding renderer.OnPrepareViewStyleInfo and not calling the base class avoids the backcolor being drawn. handling grid.DrawCellDisplayText allows you to draw the color swatch and string. http://www.syncfusion.com/Support/user/uploads/GC_Selections_b0c8abd3.zip


YS Yin San Phoon November 25, 2005 01:05 AM UTC

Thanks for that. :) Another help here. How about making the cell type of dropping down the GradientStyle just like the one when setting the GradientStyle of the Interior in the property grid?


AD Administrator Syncfusion Team November 25, 2005 02:59 AM UTC

Here is a forum thread that has a sample in it that displays a property grid using our grids. It has a UIEditor cell that I think should be able to display the type of dropdown you want. http://www.syncfusion.com/Support/forums/message.aspx?MessageID=25202

Loader.
Up arrow icon