Extjs 在一个LovCombo下拉列表里面添加了两个 全选\全不选的 toolbar..按钮..
如何在按钮调用函数的时候往函数里面传入LovCombo下拉列表的ID..谢谢.代码如下vartbCheck=newExt.Toolbar({items:[{text:'全...
如何在按钮调用函数的时候往函数里面传入LovCombo下拉列表的ID..谢谢.代码如下
var tbCheck = new Ext.Toolbar({items : [
{
text:'全选', // handler:checkbox_checkAll,
listeners:{'click':function(){checkbox_checkAll(要传入的List ID) }}
},
{
text: '取消', handler:checkbox_checkCancel
}
]}
);
var pcbXlList = new Ext.ux.form.LovCombo({ //线路ComboBox
tbar : tbCheck,
id: 'pcbXlList',
name: 'pcbXlList',
valueField: 'ID',
displayField: 'ALIASNAME',
hiddenName: 'pcbXlList_ID',
emptyText: '',
mode: 'local',
triggerAction: 'all',
selectOnFocus: false,
// emptyText: '请选择...',
allowBlank: false,
store: linestore,
x: 505,
y: 5,
height: 20,
width: 143,
initList : selectAllCheckBox
});
function checkbox_checkAll(listName){
listName.selectAll();
}
function checkbox_checkCancel(listName){
listName.deselectAll();
} 展开
var tbCheck = new Ext.Toolbar({items : [
{
text:'全选', // handler:checkbox_checkAll,
listeners:{'click':function(){checkbox_checkAll(要传入的List ID) }}
},
{
text: '取消', handler:checkbox_checkCancel
}
]}
);
var pcbXlList = new Ext.ux.form.LovCombo({ //线路ComboBox
tbar : tbCheck,
id: 'pcbXlList',
name: 'pcbXlList',
valueField: 'ID',
displayField: 'ALIASNAME',
hiddenName: 'pcbXlList_ID',
emptyText: '',
mode: 'local',
triggerAction: 'all',
selectOnFocus: false,
// emptyText: '请选择...',
allowBlank: false,
store: linestore,
x: 505,
y: 5,
height: 20,
width: 143,
initList : selectAllCheckBox
});
function checkbox_checkAll(listName){
listName.selectAll();
}
function checkbox_checkCancel(listName){
listName.deselectAll();
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询