PDA

View Full Version : Custom Form Field to update grid cell image



Frith
17 Jan 2012, 4:51 AM
Hi all,
need a little advise as to how to get started with this:

I want to use the celleditingplugin on a grid cell. The cell displays an image whose url is taken from a store...easy so far.

I want a user to be able to click on the cell to edit it and be presented with a table of images to select.

The url of the selected image would then be stored in the db and the cell updated to show it.

I have been looking at extending the TriggerField and adding a dataview to it but editing the cell just presents me with a textbox.

Any help appreciated.

Frith
17 Jan 2012, 7:47 AM
Just amazing what Google can do!

See solution attached...not perfect but will suffice...I wanted a 3 x 3 grid to drop down for selection but had to settle for a list.

What I did:

Added a renderer to the column that updated the background colour of the cell according to a value in a record and displayed an image in that cell whose source was also stored in the record.

I also modified the listConfig->getInnerTpl of a combobox to display the images and backgrounds.

Regards to all.