如何使gridpanel每行的单元格可编辑类型不同?
extjs吧
全部回复
仅看楼主
level 3
如题,请教大神们指点,非常感谢!
2015年09月21日 01点09分 1
level 9
我先设置
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 2
})],
然后我是设置那个列的field属性。。
columns:[
{header:'日期',menuDisabled:true,dataIndex:'createDate',flex:1,xtype:'datecolumn',
width:90,height:30,name:'time',
field:{xtype:'datefield',format:'Y/m/d'},
2015年09月24日 04点09分 2
level 3
比如原先可编辑类型是textfield,现在加一个监听改变编辑类型,可以加个条件判断是否执行
grid.on('edit', function(editor, e) {
// 提交更改在编辑完以后
e.column.setEditor({
xtype:'datefield',
allowBlank:true//是否可以为空
});
});
2015年09月24日 06点09分 3
在控制器中判断条件,然后设置其filed就行了啊
2015年09月24日 06点09分
@675685015 renderer里判断返回值,如果是datefield就设置格式
2015年09月25日 05点09分
1