PDA

View Full Version : Issue with rendering controls in a grid column



rishu27
29 Jul 2013, 4:20 AM
With earlier Extjs, render of controls was working fine for our gridpanel but now ext controls are not getting rendered.
With code given below everything was working fine.


var RenderControls=function(){


Ext.define('ModelPaymentMode', {
extend: 'Ext.data.Model',
fields: [
{name:"value", type:"string"},
{name:"text",type:"string"}
]
});
var storePayMode = Ext.create('Ext.data.Store', {
model: 'ModelPaymentMode',
data:[
{value: '0', text: 'Annual'},
{value: '1', text: 'Semi-Annual'},
{value: '2', text: 'Quarterly'},
{value: '3', text: 'Monthly'}
]

});


new Ext.form.ComboBox({
editable: false,
store: storeGender,
displayField: 'text',
valueField: 'value',
typeAhead: true,
queryMode: 'local',
forceSelection: true,
triggerAction: 'all',
selectOnFocus: true,
width: 80,
applyTo: 'ctl_12'
});




}


var RenderColumns = function (value, metadata, record, rowIndex, colIndex, store) {
return "<input type='text' id='ctl_" + rowIndex + "_" + colIndex + "' value='" + value + "' >";
}



GridPanelLFView.AddScript("setTimeout(\"RenderControls();\",\"0.001\")");



RenderColumns function is column renderer function.


Please see the attached image of earlier(Ext1.1_gridpanel.JPG) and current(Ext2.2_GridPanel.JPG) GridPanel for reference.
45083
45082

slemmon
30 Jul 2013, 9:24 PM
Presently the grid component doesn't support components in the grid cells (though you might keep an eye on the next releases as that may change - depending on the component used in the grid).

In the meantime you might check out this user extension:
http://skirtlesden.com/ux/component-column