PDA

View Full Version : Position of action column not well-defined



alexander.urban
4 Feb 2014, 4:33 AM
initComponent: function(){
var me=this;
Ext.applyIf(me,{

columns: [{
// menuDisabled: true,
// sortable: false,
xtype: 'actioncolumn',
width: 75,
items: [{
width:20,
iconCls: 'icon-remove',
isDisabled: me.fnIsDisabled,
handler: me.deleteHandler
},{
width:20,
iconCls: 'icon-vwdrafts',
isDisabled: me.fnIsDisabled,
handler: me.renameHandler
},{
width:20,
iconCls: 'icon-default_0',
isDisabled: me.isDefaultDisabled,
handler: me.setAsDefaultHandler
}]
}, {
text: 'Name',
dataIndex: 'name'
}, {
text: 'NameSub',
dataIndex: 'nameSub',
flex: 1
}]
});

For some reason unknown, the actioncolumn can occur at different positions. In some browsers, it is first column. Sometimes it is the second column. And sometimes it is third.

How so?

scottmartin
4 Feb 2014, 2:08 PM
What version of Ext4 are you using?

Do you see this behavior using our example in the API?
http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.column.Action

Can you send a screen?

alexander.urban
10 Feb 2014, 3:59 AM
I don't have the problem in the example.

The two screens I copied together are from the same browser (Chrome 32); with the same extjs and app code, but two different web servers and two different JSON APIs.

47870

scottmartin
10 Feb 2014, 5:20 AM
and two different JSON APIs.
Any reason to believe this is the cause?

Looks like we may need a working instance to help. You can use our fiddle (add json using bottom left tabs)
https://fiddle.sencha.com/#home

alexander.urban
10 Feb 2014, 11:05 PM
I reduced our application to the two main problems. Is there an email adress that I can send the zip file to, confidentially, so you can have a look at it?

scottmartin
11 Feb 2014, 6:05 AM
That sounds rather involved .. you may have to open a support ticket if you cannot provide a simple test case that displays the problem.

alexander.urban
11 Feb 2014, 6:22 AM
OMG.

I made a simple test case. I did not change anything in the old code - I just made a copy and changed something there (threw out everything except around 80 LoC). Result is that now the action columns are in the right place. Not just in the new copy, but also in the old, complete one.

That's some weird "W T F" moment for me, but at last it "works" now.

I will post here again if the problem reoccurs at a later time. Thanks so far.