mazhar.shaikh
9 Jun 2013, 6:58 PM
Hi,
I recently upgraded my ExtJS project from 4.1 to latest version 4.2 as well Architect Build version to 2.2.2.
After upgrade a few unusual things are happening which didn't happen before.
I have a grid panel with a NumberField Column that used to be editable. But I can no longer use the up down arrows to change the number. Doesn't do anything. Although I can type in a number.
After a few attempts to click on the arrows on the numberfield, i get this error
Uncaught TypeError: Cannot call method 'getVisibleIndex' of undefined
Following is the code for my Grid Panel with the column in bold I am referring to.
Approved Qty is the field that I am talking about.
{ xtype: 'gridpanel',
flex: 1,
id: 'eventItems',
itemId: '',
title: 'Approved And Not Yet Completed Events',
enableColumnMove: false,
forceFit: false,
store: 'BuyingPromo.AllocItem',
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'supplier',
text: 'Supplier'
},
{
xtype: 'gridcolumn',
width: 58,
dataIndex: 'cat1',
text: 'Cat1'
},
{
xtype: 'gridcolumn',
width: 59,
dataIndex: 'scat',
text: 'SCat'
},
{
xtype: 'gridcolumn',
dataIndex: 'itemCode',
text: 'Item Code'
},
{
xtype: 'gridcolumn',
width: 154,
dataIndex: 'itemDesc',
text: 'Description'
},
{
xtype: 'numbercolumn',
dataIndex: 'cost',
text: 'Cost'
},
{
xtype: 'numbercolumn',
width: 68,
dataIndex: 'soh',
text: 'SOH',
format: '0,000'
},
{
xtype: 'numbercolumn',
dataIndex: 'orderAlloc',
text: 'Orig Alloc',
format: '0,000'
},
{
xtype: 'numbercolumn',
dataIndex: 'orderApproved',
text: '<b>Approved Qty</b>',
format: '0,000',
editor: {
xtype: 'numberfield',
id: 'approvedQtyNumberField',
selectOnFocus: true,
spinDownEnabled: false,
spinUpEnabled: false,
decimalPrecision: 0,
maxValue: 32000,
minValue: 0
}
},
{
xtype: 'gridcolumn',
dataIndex: 'packType',
text: 'Pack'
},
{
xtype: 'numbercolumn',
dataIndex: 'totalCost',
text: 'Total Cost'
},
{
xtype: 'booleancolumn',
dataIndex: 'isApproved',
text: '<b>Approved</b>',
editor: {
xtype: 'checkboxfield',
boxLabel: ''
}
},
{
xtype: 'gridcolumn',
dataIndex: 'importance',
text: 'Importance'
},
{
xtype: 'gridcolumn',
renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
metaData.tdAttr = 'data-qtip="' + value + '"';
return value;
},
dataIndex: 'itemComments',
text: 'Comments'
}
],
viewConfig: {
id: 'eventDetailView',
enableTextSelection: true
},
selModel: Ext.create('Ext.selection.CellModel', {
}),
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
]
}
Attached as well is the screenshot of the error and my screen.44254
I recently upgraded my ExtJS project from 4.1 to latest version 4.2 as well Architect Build version to 2.2.2.
After upgrade a few unusual things are happening which didn't happen before.
I have a grid panel with a NumberField Column that used to be editable. But I can no longer use the up down arrows to change the number. Doesn't do anything. Although I can type in a number.
After a few attempts to click on the arrows on the numberfield, i get this error
Uncaught TypeError: Cannot call method 'getVisibleIndex' of undefined
Following is the code for my Grid Panel with the column in bold I am referring to.
Approved Qty is the field that I am talking about.
{ xtype: 'gridpanel',
flex: 1,
id: 'eventItems',
itemId: '',
title: 'Approved And Not Yet Completed Events',
enableColumnMove: false,
forceFit: false,
store: 'BuyingPromo.AllocItem',
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'supplier',
text: 'Supplier'
},
{
xtype: 'gridcolumn',
width: 58,
dataIndex: 'cat1',
text: 'Cat1'
},
{
xtype: 'gridcolumn',
width: 59,
dataIndex: 'scat',
text: 'SCat'
},
{
xtype: 'gridcolumn',
dataIndex: 'itemCode',
text: 'Item Code'
},
{
xtype: 'gridcolumn',
width: 154,
dataIndex: 'itemDesc',
text: 'Description'
},
{
xtype: 'numbercolumn',
dataIndex: 'cost',
text: 'Cost'
},
{
xtype: 'numbercolumn',
width: 68,
dataIndex: 'soh',
text: 'SOH',
format: '0,000'
},
{
xtype: 'numbercolumn',
dataIndex: 'orderAlloc',
text: 'Orig Alloc',
format: '0,000'
},
{
xtype: 'numbercolumn',
dataIndex: 'orderApproved',
text: '<b>Approved Qty</b>',
format: '0,000',
editor: {
xtype: 'numberfield',
id: 'approvedQtyNumberField',
selectOnFocus: true,
spinDownEnabled: false,
spinUpEnabled: false,
decimalPrecision: 0,
maxValue: 32000,
minValue: 0
}
},
{
xtype: 'gridcolumn',
dataIndex: 'packType',
text: 'Pack'
},
{
xtype: 'numbercolumn',
dataIndex: 'totalCost',
text: 'Total Cost'
},
{
xtype: 'booleancolumn',
dataIndex: 'isApproved',
text: '<b>Approved</b>',
editor: {
xtype: 'checkboxfield',
boxLabel: ''
}
},
{
xtype: 'gridcolumn',
dataIndex: 'importance',
text: 'Importance'
},
{
xtype: 'gridcolumn',
renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
metaData.tdAttr = 'data-qtip="' + value + '"';
return value;
},
dataIndex: 'itemComments',
text: 'Comments'
}
],
viewConfig: {
id: 'eventDetailView',
enableTextSelection: true
},
selModel: Ext.create('Ext.selection.CellModel', {
}),
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
]
}
Attached as well is the screenshot of the error and my screen.44254