PDA

View Full Version : [DUP] [4.0.1] PropertyGrid always sortable event sortableColumns set to false



Antronak
27 May 2011, 12:24 AM
Hi,

There is a bug in PropertyGrid. Grid is always sorted and sortable even sortableColumns is set to false.

ext-spring-mvc
29 Jun 2011, 12:24 PM
any voice from sencha? I have the same issue with 4.0.2a-commercial

ext-spring-mvc
29 Jun 2011, 12:27 PM
a quick look the source code of Ext.grid.property.Grid. it is hardcoded sorting in initComponent:



// private
initComponent : function(){
var me = this;

me.addCls(Ext.baseCSSPrefix + 'property-grid');
me.plugins = me.plugins || [];

// Enable cell editing. Inject a custom startEdit which always edits column 1 regardless of which column was clicked.
me.plugins.push(Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: me.clicksToEdit,

// Inject a startEdit which always edits the value column
startEdit: function(record, column) {
// Maintainer: Do not change this 'this' to 'me'! It is the CellEditing object's own scope.
return this.self.prototype.startEdit.call(this, record, me.headerCt.child('#' + me.valueField));
}
}));

me.selModel = {
selType: 'cellmodel',
onCellSelect: function(position) {
if (position.column != 1) {
position.column = 1;
}
return this.self.prototype.onCellSelect.call(this, position);
}
};
me.customRenderers = me.customRenderers || {};
me.customEditors = me.customEditors || {};

// Create a property.Store from the source object unless configured with a store
if (!me.store) {
me.propStore = me.store = Ext.create('Ext.grid.property.Store', me, me.source);
}

me.store.sort('name', 'ASC');

mike.estes
1 Jul 2011, 10:27 AM
I pushed this bug into the system, thank you for the report. Just an FYI that we are asking people to fill out this template (http://www.sencha.com/forum/showthread.php?138165-How-to-report-a-bug) for all future bug reports, even those easily reproducible such as this one.