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.
Syncfusion Feedback

Draw color swatch in cell

Thread ID:

Created:

Updated:

Platform:

Replies:

37489 Nov 23,2005 07:58 AM UTC Nov 25,2005 02:59 AM UTC Windows Forms 3
loading
Tags: GridControl
Yin San Phoon
Asked On November 23, 2005 07:58 AM UTC

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

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

Yin San Phoon
Replied On 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?

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

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

;