View Full Version : Extending PropertyGrid

2 Aug 2010, 5:01 AM

I'm actually developping an "extended" PropertyGrid (based on a EditorGridPanel) for a project I'm working on. I'm adding new record types like auto-populating comboboxes, customized datatypes that launch a special window with a TriggerField.. etc..

I was able to add everything I wanted to, but now I want to add an improvement: I want to have some sort of displayField/valueField system like the Combobox.

Why ? Just because in my propertygrid I have some complex datatypes that I have to store in the database, but I don't want my clients to see the actual raw data (it's 99% of the time an ID that I want to store), I wan't them to see some "user friendly" data like a text instead an ID.

Any advice on how to add some sort of hiddenField to my propertygrid for each record and how to return the hiddenvalue after editing in-grid ?

Thanks a lot,


2 Aug 2010, 5:30 AM
And you can't use a ComboBox (renderer+editor)?

2 Aug 2010, 5:50 AM
The thing is I have to do several custom forms that will open upon user's trigger click (using a simple combobox isn't reliable because I have to filter thousands of records). In this form the user can filter the records and clicking OK will set the value back to the propertygrid. I can do this extending TriggerField (onTriggerClick + setValue after filtering the records). But I wasn't able to reproduce the way ComboBox works (setting a hiddenValue and a displayValue after editComplete).

Maybe something like ComboBox is doing with assertValues but I don't know if it's the right way to do...

And correct me if I'm wrong but if you're using a ComboBox in a EditorGrid, after selecting a value and completeEdit, the underlying grid will receive and show the valueField, not the displayField ? (That's just what I don't want, I wan't to show the displayField back into the EditorGrid, or PropertyGrid, keeping the valueField available for when I'm saving back the values to the server).

Sorry it's a little difficult to explain cirrectly what I want as English is'nt my main language.

Thanks a lot,


2 Aug 2010, 6:23 AM
Some posts that might interrest you:
getCellEditor example (http://www.sencha.com/forum/showthread.php?29853-set-field-type-in-editor-grid-based-on-a-combo-box-selection&p=141782#post141782)
Ext.util.Format.comboRenderer (http://www.sencha.com/forum/showthread.php?67488-3.x-Ext.grid.ComboColumn-amp-Ext.util.Format.comboRenderer)
PropertyGrid extensions (http://www.sencha.com/forum/showthread.php?72709-DONE-PropertyGrid-extensions) (implemented in Ext 3.1)