0

我正在尝试使用 EXTjs4 创建一个链接的组合框,我正在考虑使用静态数组数据源。我查看了 sencha 网站上的示例,但找不到任何示例。谢谢

4

1 回答 1

0

我过去做过类似的事情。我有两个组合框 - 一个显示员工(valueField:EmployeeID),另一个显示经理(valueField:EmployeeID)。当用户选择员工时,另一个组合框会自动显示该员工的经理。这是我使用的:

var EmployeesComboBox = Ext.create('Ext.form.ComboBox', {
    listeners:{
         'select': function(cbo, records) {
              // set the value of the other combo box to the selected employee ID
              Ext.getCmp('id_of_2nd_combo_box').setValue(records[0].data.EmployeeID);
          }
    }
});
于 2012-08-09T14:55:39.273 回答