Hello to everyone,
Firstly, I would like to say a few words about where I am at, right now. I have a table of
Products and a table of
ProductPhotos. Additionally, I have created a CMP that consists of a
MODx.grid.Grid filled with data from both of the above tables.
I want to be able to upload product photos in a server folder while the path of that photo is stored in a cell of the
ProductPhotos table.
In order to achieve the above, I have placed a '
modx-combo-browser' in a column as an editor. The file browser window shows up just fine. However, the problem arises when I select an image.
I know that I can get the photo path through code like this:
var colModel = [{
...
{
dataIndex: 'aDataIndex',
editor: {
listeners: {
'select': { fn: function(data) { ... data.relativeUrl ... }, scope: this }
},
xtype: 'modx-combo-browser'
},
header: 'aHeader'
}
...
}];
But, how can I set this value to show up in the grid's cell and, then submit it through the 'autosave' functionality the MODx.grid.Grid supports?
Thank you for your answers.