问一个关于ext.net TreePanel控件的问题
TreePanel放在DropDownField中,现在想实现如下功能。当AssignWareHouse(第一级父仓库)值发生改变时,WarehousePosition的...
TreePanel放在DropDownField中,现在想实现如下功能。当Assign WareHouse(第一级父仓库)值发生改变时,WarehousePosition的tree则应该变成对应的子仓库。问题,现在就是不知道要怎么去实现相关功能。
展开
1个回答
2013-08-20
展开全部
//获取GridPanel中dropdownfiled下的treePanel控件的值
var getWarehouseValue = function (el,node) { // Warehouse dropdownlist selecting method, edit by Annie
if (node.leaf!=true) {
Ext.Msg.confirm("",hdPleaseSelectWarehouseLast.getValue(),function (btn) {
if (btn == "yes") {
el.dropDownField.setValue(node.id,node.text,true);
hdPid.setValue(node.id); if(!el.dropDownField.grid.record.modifyJsonObject){
el.dropDownField.grid.record.modifyJsonObject = {};
}
el.dropDownField.grid.record.modifyJsonObject.WarehouseId = node.id;
el.dropDownField.grid.record.modifyJsonObject.WareHouseName = node.text;
//el.dropDownField.grid.record.data.WarehouseId = node.id;
el.dropDownField.grid.record.data.WareHouseName = node.text;
}
}, this);
}else{
el.dropDownField.setValue(node.id,node.text,true);
hdPid.setValue(node.id); if(!el.dropDownField.grid.record.modifyJsonObject){
el.dropDownField.grid.record.modifyJsonObject = {};
}
el.dropDownField.grid.record.modifyJsonObject.WarehouseId = node.id;
el.dropDownField.grid.record.modifyJsonObject.WareHouseName = node.text;
//el.dropDownField.grid.record.data.WarehouseId = node.id;
el.dropDownField.grid.record.data.WareHouseName = node.text;
}
};
var getWarehouseValue = function (el,node) { // Warehouse dropdownlist selecting method, edit by Annie
if (node.leaf!=true) {
Ext.Msg.confirm("",hdPleaseSelectWarehouseLast.getValue(),function (btn) {
if (btn == "yes") {
el.dropDownField.setValue(node.id,node.text,true);
hdPid.setValue(node.id); if(!el.dropDownField.grid.record.modifyJsonObject){
el.dropDownField.grid.record.modifyJsonObject = {};
}
el.dropDownField.grid.record.modifyJsonObject.WarehouseId = node.id;
el.dropDownField.grid.record.modifyJsonObject.WareHouseName = node.text;
//el.dropDownField.grid.record.data.WarehouseId = node.id;
el.dropDownField.grid.record.data.WareHouseName = node.text;
}
}, this);
}else{
el.dropDownField.setValue(node.id,node.text,true);
hdPid.setValue(node.id); if(!el.dropDownField.grid.record.modifyJsonObject){
el.dropDownField.grid.record.modifyJsonObject = {};
}
el.dropDownField.grid.record.modifyJsonObject.WarehouseId = node.id;
el.dropDownField.grid.record.modifyJsonObject.WareHouseName = node.text;
//el.dropDownField.grid.record.data.WarehouseId = node.id;
el.dropDownField.grid.record.data.WareHouseName = node.text;
}
};
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询