[英]ExtJs - Javascript - ComboBox in Grid (Cell editing plugin) - Drop down list behind the Grid/Window
I have a grid with cell editing plugin on it. 我有一个带有单元格编辑插件的网格。 When i click the cell i want to edit, sometimes the dropdown list of the combo box is behind the grid/window (I can not see it, but if i modify the window size i can see the combo box items behind it). 当我单击要编辑的单元格时,有时组合框的下拉列表位于网格/窗口的后面(我看不到它,但是如果我修改窗口大小,则可以看到其后面的组合框项目)。
My code looks like this (I have a window which contains this form): 我的代码如下所示(我有一个包含此表单的窗口):
items: [{
xtype: 'form',
items: [
me.currentMultipleValuesGrid = Ext.create('Ext.grid.Panel', {
store: me.gridStoreToValidate,
plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
delay: 10
})],
listeners: {
validateedit: function (editor, cell, eOpts) {
//cell.cancel = true;
}
},
columns: [{
header: GTR(CLNAME(me), 'colSource.Text', 'Source'),
dataIndex: 'source',
flex: 1
}, {
dataIndex: 'name',
header: GTR(CLNAME(me), 'colLinkDestination.Text', 'Link destination'),
editor: {
xtype: 'combobox',
queryMode: 'local',
valueField: 'nr',
displayField: 'name',
store: me.comboBoxEditorStore,
listeners: {
change: function (thisCmb, newValue, oldValue) {
},
beforerender: function (thisCmb, eOpts) {
}
}
},
flex: 1
}, {
dataIndex: 'linkdestination',
hidden: true
}]
})]
}]
I think it is a layout problem, so I tried different layouts (anchor and fit) assigned to window, grid or form, with various combinations of them. 我认为这是一个布局问题,因此我尝试为窗口,网格或窗体分配了不同的布局(锚定和合适),并使用了它们的各种组合。 No success so far. 到目前为止没有成功。 Any ideas? 有任何想法吗? Thank you. 谢谢。 I am using Extjs 4.0.7 我正在使用Extjs 4.0.7
I solved this a while ago. 我前一阵子解决了。 Came back to post the answer, in case someone needs it. 如果有人需要,请回来发布答案。 It seems it is a Sencha bug, which causes the drop down list to be displayed behind the window, when the window is modal (like it was in my case). 看来这是一个Sencha错误,当窗口是模式窗口时,它会导致下拉列表显示在窗口后面(就像我的情况一样)。 I managed to make a workaround, by assigning a css class to the drop down list of the combo, by adding this in combo settings : 我设法通过将css类分配给组合的下拉列表并在组合设置中添加此方法来做出解决方法:
listConfig: { cls: 'clsZIndexMax' }
where clsZIndexMax
is my css class containing z-index: 100000 !important;
其中clsZIndexMax
是我的css类,包含z-index: 100000 !important;
PS: I had this bug in version 4.0.7, don't know if they already solved it in future versions. PS:我在4.0.7版中有此错误,不知道他们是否在以后的版本中已解决。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.