Property grid with combobox










1















I have some store, which is formed data. On panel, it looks how "fieldName" and text field (in depension from invoked form).



For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamically.



Here is store:



tableTempStore = new Ext.data.JsonStore(
url: objectUrlAddress,
baseParams:
'objectID': objectID
,
root: 'Fields',
fields: [
name: 'Hint'
,
name: 'Type',
type: 'int'
,
name: 'Value'
,
name: 'Index',
type: 'int'
,
name: 'IsRequired',
type: 'bool'
,
name: 'Identifier'
,
name: 'EnumList'
,
name: 'Directory'
,
name: 'Data'
],
listeners:
load: function (obj, records)
Ext.each(records, function (rec)
var item = null;
switch (rec.get('Type'))
case 0: // целое
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 1: // вещественное
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.allowDecimals = true;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 5: // SQL-справочник
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
item = new Ext.form.ComboBox(
typeAhead: true,
width: '100%',
triggerAction: 'all',
forceSelection: true,
editable: false,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText'
],
data: dataArray
),
valueField: 'myId',
displayField: 'displayText',
disabled: editDisabled
);
item.id = '_' + rec.get('Identifier');
item.anchor = '100%';
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.allowBlank = !isRequired;
item.value = rec.get('Data');
break;

if (item != null)
templateGrids.add(item);
columnsTable = item.__proto__.constructor.xtype;
var s = null;
else if (rec.get('Type') == 4)
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
combo = new Ext.grid.GridEditor(new Ext.form.ComboBox(
id: item.id,
allowBlank: item.allowBlank,
typeAhead: true,
lazyRender: true,
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
editable: false,
value: item.value,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText',
type: 'string'
],
data: dataArray
),
valueField: "myId",
displayField: "displayText",
disabled: editDisabled
));

source[item.fieldLabel] = '';
grid.customEditors['Сохранить в'] = combo;

grid.getColumnModel().setConfig([
header: "Поле"
,
header: "Значение",
dataIndex: '',
renderer: Ext.util.Format.comboRenderer(combo)
]);
grid.setSource(source);
;
);


);


Here's my property grid:



grid = new Ext.grid.PropertyGrid(
url: objectUrlAddress,
id: 'propGrid',
autoFill: true,
autoHeight: true,
width: 200,
store: tableTempStore,
width: 600,
style: 'margin:0 auto;margin-top:10px;'
);


Problem with combo box. It show itemValue instead fieldValue on cell, and I don't know how to resolve this problem. How can I do? Thanks in advance.



For rendering I used function:



Ext.util.Format.comboRenderer = function (combo) 
return function (value)
var record = combo.findRecord(combo.valueField, value);
return record ? record.get(combo.displayField) : combo.valueNotFoundText;

;


But it not worked.










share|improve this question



















  • 1





    Make sure store of combobox is loaded before setting the value.

    – Rohit Sharma
    Nov 15 '18 at 7:13











  • What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

    – Norman94
    Nov 15 '18 at 7:19






  • 1





    can you post a fiddle for what you have done so far.

    – Rohit Sharma
    Nov 15 '18 at 8:36











  • I can't registered there. Can you give some advices, how i can resolve problem with combobox?

    – Norman94
    Nov 15 '18 at 8:51











  • What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

    – Daniel da Cunha Bueno
    Nov 16 '18 at 1:40
















1















I have some store, which is formed data. On panel, it looks how "fieldName" and text field (in depension from invoked form).



For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamically.



Here is store:



tableTempStore = new Ext.data.JsonStore(
url: objectUrlAddress,
baseParams:
'objectID': objectID
,
root: 'Fields',
fields: [
name: 'Hint'
,
name: 'Type',
type: 'int'
,
name: 'Value'
,
name: 'Index',
type: 'int'
,
name: 'IsRequired',
type: 'bool'
,
name: 'Identifier'
,
name: 'EnumList'
,
name: 'Directory'
,
name: 'Data'
],
listeners:
load: function (obj, records)
Ext.each(records, function (rec)
var item = null;
switch (rec.get('Type'))
case 0: // целое
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 1: // вещественное
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.allowDecimals = true;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 5: // SQL-справочник
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
item = new Ext.form.ComboBox(
typeAhead: true,
width: '100%',
triggerAction: 'all',
forceSelection: true,
editable: false,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText'
],
data: dataArray
),
valueField: 'myId',
displayField: 'displayText',
disabled: editDisabled
);
item.id = '_' + rec.get('Identifier');
item.anchor = '100%';
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.allowBlank = !isRequired;
item.value = rec.get('Data');
break;

if (item != null)
templateGrids.add(item);
columnsTable = item.__proto__.constructor.xtype;
var s = null;
else if (rec.get('Type') == 4)
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
combo = new Ext.grid.GridEditor(new Ext.form.ComboBox(
id: item.id,
allowBlank: item.allowBlank,
typeAhead: true,
lazyRender: true,
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
editable: false,
value: item.value,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText',
type: 'string'
],
data: dataArray
),
valueField: "myId",
displayField: "displayText",
disabled: editDisabled
));

source[item.fieldLabel] = '';
grid.customEditors['Сохранить в'] = combo;

grid.getColumnModel().setConfig([
header: "Поле"
,
header: "Значение",
dataIndex: '',
renderer: Ext.util.Format.comboRenderer(combo)
]);
grid.setSource(source);
;
);


);


Here's my property grid:



grid = new Ext.grid.PropertyGrid(
url: objectUrlAddress,
id: 'propGrid',
autoFill: true,
autoHeight: true,
width: 200,
store: tableTempStore,
width: 600,
style: 'margin:0 auto;margin-top:10px;'
);


Problem with combo box. It show itemValue instead fieldValue on cell, and I don't know how to resolve this problem. How can I do? Thanks in advance.



For rendering I used function:



Ext.util.Format.comboRenderer = function (combo) 
return function (value)
var record = combo.findRecord(combo.valueField, value);
return record ? record.get(combo.displayField) : combo.valueNotFoundText;

;


But it not worked.










share|improve this question



















  • 1





    Make sure store of combobox is loaded before setting the value.

    – Rohit Sharma
    Nov 15 '18 at 7:13











  • What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

    – Norman94
    Nov 15 '18 at 7:19






  • 1





    can you post a fiddle for what you have done so far.

    – Rohit Sharma
    Nov 15 '18 at 8:36











  • I can't registered there. Can you give some advices, how i can resolve problem with combobox?

    – Norman94
    Nov 15 '18 at 8:51











  • What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

    – Daniel da Cunha Bueno
    Nov 16 '18 at 1:40














1












1








1








I have some store, which is formed data. On panel, it looks how "fieldName" and text field (in depension from invoked form).



For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamically.



Here is store:



tableTempStore = new Ext.data.JsonStore(
url: objectUrlAddress,
baseParams:
'objectID': objectID
,
root: 'Fields',
fields: [
name: 'Hint'
,
name: 'Type',
type: 'int'
,
name: 'Value'
,
name: 'Index',
type: 'int'
,
name: 'IsRequired',
type: 'bool'
,
name: 'Identifier'
,
name: 'EnumList'
,
name: 'Directory'
,
name: 'Data'
],
listeners:
load: function (obj, records)
Ext.each(records, function (rec)
var item = null;
switch (rec.get('Type'))
case 0: // целое
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 1: // вещественное
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.allowDecimals = true;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 5: // SQL-справочник
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
item = new Ext.form.ComboBox(
typeAhead: true,
width: '100%',
triggerAction: 'all',
forceSelection: true,
editable: false,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText'
],
data: dataArray
),
valueField: 'myId',
displayField: 'displayText',
disabled: editDisabled
);
item.id = '_' + rec.get('Identifier');
item.anchor = '100%';
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.allowBlank = !isRequired;
item.value = rec.get('Data');
break;

if (item != null)
templateGrids.add(item);
columnsTable = item.__proto__.constructor.xtype;
var s = null;
else if (rec.get('Type') == 4)
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
combo = new Ext.grid.GridEditor(new Ext.form.ComboBox(
id: item.id,
allowBlank: item.allowBlank,
typeAhead: true,
lazyRender: true,
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
editable: false,
value: item.value,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText',
type: 'string'
],
data: dataArray
),
valueField: "myId",
displayField: "displayText",
disabled: editDisabled
));

source[item.fieldLabel] = '';
grid.customEditors['Сохранить в'] = combo;

grid.getColumnModel().setConfig([
header: "Поле"
,
header: "Значение",
dataIndex: '',
renderer: Ext.util.Format.comboRenderer(combo)
]);
grid.setSource(source);
;
);


);


Here's my property grid:



grid = new Ext.grid.PropertyGrid(
url: objectUrlAddress,
id: 'propGrid',
autoFill: true,
autoHeight: true,
width: 200,
store: tableTempStore,
width: 600,
style: 'margin:0 auto;margin-top:10px;'
);


Problem with combo box. It show itemValue instead fieldValue on cell, and I don't know how to resolve this problem. How can I do? Thanks in advance.



For rendering I used function:



Ext.util.Format.comboRenderer = function (combo) 
return function (value)
var record = combo.findRecord(combo.valueField, value);
return record ? record.get(combo.displayField) : combo.valueNotFoundText;

;


But it not worked.










share|improve this question
















I have some store, which is formed data. On panel, it looks how "fieldName" and text field (in depension from invoked form).



For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamically.



Here is store:



tableTempStore = new Ext.data.JsonStore(
url: objectUrlAddress,
baseParams:
'objectID': objectID
,
root: 'Fields',
fields: [
name: 'Hint'
,
name: 'Type',
type: 'int'
,
name: 'Value'
,
name: 'Index',
type: 'int'
,
name: 'IsRequired',
type: 'bool'
,
name: 'Identifier'
,
name: 'EnumList'
,
name: 'Directory'
,
name: 'Data'
],
listeners:
load: function (obj, records)
Ext.each(records, function (rec)
var item = null;
switch (rec.get('Type'))
case 0: // целое
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 1: // вещественное
item = new Ext.form.NumberField();
item.id = rec.get('Identifier');
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.anchor = '100%';
item.allowBlank = !isRequired;
item.allowDecimals = true;
item.disabled = editDisabled;
item.value = rec.get('Data');
break;
case 5: // SQL-справочник
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
item = new Ext.form.ComboBox(
typeAhead: true,
width: '100%',
triggerAction: 'all',
forceSelection: true,
editable: false,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText'
],
data: dataArray
),
valueField: 'myId',
displayField: 'displayText',
disabled: editDisabled
);
item.id = '_' + rec.get('Identifier');
item.anchor = '100%';
item.fieldLabel = rec.get('Hint');
var isRequired = rec.get('IsRequired');
item.allowBlank = !isRequired;
item.value = rec.get('Data');
break;

if (item != null)
templateGrids.add(item);
columnsTable = item.__proto__.constructor.xtype;
var s = null;
else if (rec.get('Type') == 4)
var dataValues = Ext.util.JSON.decode(rec.get('EnumList'));
var dataArray = Object.keys(dataValues).map(function (k)
return [k, dataValues[k]]
);
combo = new Ext.grid.GridEditor(new Ext.form.ComboBox(
id: item.id,
allowBlank: item.allowBlank,
typeAhead: true,
lazyRender: true,
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
editable: false,
value: item.value,
hiddenName: rec.get('Identifier'),
mode: 'local',
store: new Ext.data.ArrayStore(
fields: [
name: 'myId',
type: 'string'
,
name: 'displayText',
type: 'string'
],
data: dataArray
),
valueField: "myId",
displayField: "displayText",
disabled: editDisabled
));

source[item.fieldLabel] = '';
grid.customEditors['Сохранить в'] = combo;

grid.getColumnModel().setConfig([
header: "Поле"
,
header: "Значение",
dataIndex: '',
renderer: Ext.util.Format.comboRenderer(combo)
]);
grid.setSource(source);
;
);


);


Here's my property grid:



grid = new Ext.grid.PropertyGrid(
url: objectUrlAddress,
id: 'propGrid',
autoFill: true,
autoHeight: true,
width: 200,
store: tableTempStore,
width: 600,
style: 'margin:0 auto;margin-top:10px;'
);


Problem with combo box. It show itemValue instead fieldValue on cell, and I don't know how to resolve this problem. How can I do? Thanks in advance.



For rendering I used function:



Ext.util.Format.comboRenderer = function (combo) 
return function (value)
var record = combo.findRecord(combo.valueField, value);
return record ? record.get(combo.displayField) : combo.valueNotFoundText;

;


But it not worked.







javascript extjs combobox grid propertygrid






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 7:57









Rohit Sharma

1,255618




1,255618










asked Nov 15 '18 at 7:08









Norman94Norman94

364




364







  • 1





    Make sure store of combobox is loaded before setting the value.

    – Rohit Sharma
    Nov 15 '18 at 7:13











  • What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

    – Norman94
    Nov 15 '18 at 7:19






  • 1





    can you post a fiddle for what you have done so far.

    – Rohit Sharma
    Nov 15 '18 at 8:36











  • I can't registered there. Can you give some advices, how i can resolve problem with combobox?

    – Norman94
    Nov 15 '18 at 8:51











  • What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

    – Daniel da Cunha Bueno
    Nov 16 '18 at 1:40













  • 1





    Make sure store of combobox is loaded before setting the value.

    – Rohit Sharma
    Nov 15 '18 at 7:13











  • What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

    – Norman94
    Nov 15 '18 at 7:19






  • 1





    can you post a fiddle for what you have done so far.

    – Rohit Sharma
    Nov 15 '18 at 8:36











  • I can't registered there. Can you give some advices, how i can resolve problem with combobox?

    – Norman94
    Nov 15 '18 at 8:51











  • What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

    – Daniel da Cunha Bueno
    Nov 16 '18 at 1:40








1




1





Make sure store of combobox is loaded before setting the value.

– Rohit Sharma
Nov 15 '18 at 7:13





Make sure store of combobox is loaded before setting the value.

– Rohit Sharma
Nov 15 '18 at 7:13













What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

– Norman94
Nov 15 '18 at 7:19





What you mean? First, how i understand, is loaded grid, after that store with items (including combobox with store). On site combobox loads needing items, but keyvalue rendering on grid.

– Norman94
Nov 15 '18 at 7:19




1




1





can you post a fiddle for what you have done so far.

– Rohit Sharma
Nov 15 '18 at 8:36





can you post a fiddle for what you have done so far.

– Rohit Sharma
Nov 15 '18 at 8:36













I can't registered there. Can you give some advices, how i can resolve problem with combobox?

– Norman94
Nov 15 '18 at 8:51





I can't registered there. Can you give some advices, how i can resolve problem with combobox?

– Norman94
Nov 15 '18 at 8:51













What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

– Daniel da Cunha Bueno
Nov 16 '18 at 1:40






What @RohitSharma is saying is that the store you use inside the column renderer where the editor is a combobox must be loaded before passing through the renderer method. You previously create a loading mechanism to try to show the text referring to the value of the combobox store. Right @RohitSharma?

– Daniel da Cunha Bueno
Nov 16 '18 at 1:40













0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314107%2fproperty-grid-with-combobox%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53314107%2fproperty-grid-with-combobox%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3

Museum of Modern and Contemporary Art of Trento and Rovereto