您的位置:首页 > 其它

ext6.2如何在grid表格列里加button按钮

2017-11-13 17:48 465 查看


一个列里如何放置2个button  见上图 用widgetcolumn组件 手册例子默认只能放一个 我用的panel放的2个小组件button

xtype: 'widgetcolumn',
flex: 1,
text:'操作',
widget: {
xtype: 'panel',
items: [{
xtype: 'button',
text: '添加'
},
{
xtype: 'button',
style:'background:red',
text: '删除'
}]
}


下面一种是grid列里放置button 显示为图标 使用actioncolumn组件 



代码如下

xtype : 'actioncolumn',
text : '操作',
width : 200,
tdCls : 'action',
items : [
{
xtype : 'button',
text : '应急事件详细信息',
flex : 1,
tooltip : '应急事件详细信息',

}
, {
xtype : 'button',
text : "编辑",
iconCls : 'x-fa fa-pencil fa-lg', // building-o
tooltip : '编辑',
handler : 'onUpdate'
},
{
iconCls : 'x-fa fa-remove',
tooltip : '删除',
handler : 'onDel'
} ]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: