PDA

View Full Version : Grid with Combo and image



AtulDawkhare
26 Mar 2012, 9:45 PM
Hi
I want to show Grid's columns with Combo and Image attached to it. As shown in the screenshot attached.

33180
in the Combo there are other options, like View , view edit etc. I want to show image only on if user selects 'Custom' from the drop down.

Here is my code .


[columnConfig==true ?
{
xtype: 'itscomponentcolumn',
text : '<b>Project</b>',
width: 120,
dataIndex: 'project',
items: function(value) {
return {
xtype: 'combobox',
store: [[0,'View Only'], [1,'View & Edit'], [2,'View,Edit & Delete'],[3,'No Access'],[4,'Custom']],
displayField: 'display',
valueField: 'value',
forceSelection:true,
id:'project',
width: 100,
listeners: {
change: function(comboField, newValue, oldValue, eOpts)
{
AssignToHiddenComponent(newValue,this.id);
},
afterrender: function(combo) {
var recordSelected = combo.getStore().getAt(0);
combo.setValue(recordSelected.get('field1'));
}
}
};
}
} :
{
text: '<b>project</b>',
width: 120,
id:'project',
dataIndex: 'project'
}
]


I am not able to understand How to do this.
Please suggest.