PDA

View Full Version : Editing a column in EditorGridPanel with FormPanel



Lobermann
27 Aug 2010, 6:01 AM
Hello,

i have googled a lot but i'm not able to find a solution to this.
I have a EditorGridPanel where most of the columns are edited with the "editor: fm.TextField" value.
But i have a column where a image path is displayed.
So i want, if the user clicks on the path to edit it, that a new window/FormPanel shows, with a preview of
the current image and button to upload a new one.

Is there any example similar to this? Or can someone give me a small advise how to solve this?

Cheers

Ash2009
31 Aug 2010, 7:48 PM
you can use the RowExpander plugin and override the expand listener to display your form.

Lobermann
1 Sep 2010, 12:42 AM
Thx Ash for you answer.

If have solved it in the following way:



grid.on('cellclick', function(grid, rowIndex, columnIndex, e) {
var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
if(fieldName == 'image')
{
.....


Then I normally .show() the editing window.