View Full Version : Color picker in Property grid

29 Nov 2010, 7:43 AM
Hi guys,
I am new to ExtJS and i am trying to implement a color picker into a property grid similar to date picker.
How can i do it?


29 Nov 2010, 8:05 AM
First you need a ColorField (that's somewhere in the User Extensions forum).

Next, you create an instance of this field and register it as editor (using the PropertyGrid customEditors property).

You probably also want to register a renderer (using the PropertyGrid customRenderers property) to show the color when not editing.

29 Nov 2010, 8:13 AM
If you want a more flexible, photoshop styled colour picker, you can use a jQuery plugin and intergrate it. I used a listener for on colour change, update the background color of my div to show a preview when not editing.

29 Nov 2010, 8:22 AM
Thanks for your replies guys.
Can you tell me where can i find some examples about creating property grid instances and registering renderer
because i don't have much experience in extjs, i started working with ext 2 weeks ago.

29 Nov 2010, 8:28 AM
Here's an example (http://www.sencha.com/forum/showthread.php?86908-SOLVED-Property-grid-with-combobox-editors-(item.on-is-not-a-function)&p=416334#post416334).

29 Nov 2010, 11:38 AM
Thanks a lot, Condor.I have solved it.