View Full Version : Color Picker in Ext.grid.PropertyGrid (Again!?)

17 Oct 2012, 7:49 AM
I know this isn't widely supported, but it's ok for my usage to require people to use Chrome.. which has a very nice color picker built in.

I'm trying to add support for some custom types in the property grid, for an in-house application. I would like to use the native <input type="color"/> -- however if I pass this into the property grid, all I get is a non-editable colored box.

So what I came up with was to suppress the editor part of the color chooser all-together.


T (http://jsfiddle.net/EznUc/26/)here are a couple problems with using the method - I'll have to dig out the unique ID from the editor component (for example), so I can retrieve the value. Effectively bypassing the native functionality of the ProperyGrid.

The question is, is there a better way to do this?

Thank you for your time,
Jason Andersen

19 Oct 2012, 8:09 AM
You could probably create the customRenderers in the constructor then you can control the id being specified

19 Oct 2012, 4:42 PM
Thank you for the suggestion. In the fiddle, I do have a custom renderer, so I can arbitrarily assign the ID.

Doing it this way bypasses the automatic store updates etc... While I can make it work, I was just hoping there might be a nicer way. I imagine we could probably call this closed.