求助,EXTJS问题
function newWin() {
             var selModel = Ext.create('Ext.selection.CheckboxModel', {
                 listeners: {
                     selectionchange: function (sm, selections) {
                         grid4.down('#removeButton').setDisabled(selections.length == 0);
                     }
                 }
             });
             var listGrid = new Ext.grid.GridPanel({
                     id: 'IICAgrid',
                     width: 650,
                     height: 100,
                     store: getLocalStore(),
                     xtype: "gridpanel",
                     selModel: sm,
                     columnLines: true,
                     columns: [
                     { text: '档案编号', dataIndex: "FileNo" },
                     { text: '姓名', dataIndex: "Name" },
                     { text: '性别', dataIndex: "Sex" },
                     { text: '出生日期', dataIndex: "Brithday" },
                     { text: '身份证号', dataIndex: "Cardid" },
                     { text: '与户主关系', dataIndex: "Household" }
                     ]
             })
             var win = Ext.create('Ext.window.Window', {
                 title: '从农合信息导入',
                 width: 650,
                 height: 300,
                 plain: true,
                 closeAction: 'hide', // 关闭窗口
                 modal: true,
                 maximizable: false, // 最大化控制 值为true时可以最大化窗体
                 layout: 'border',
                 contentEl: 'tab',
                 items: listGrid,
                 listeners: {
                     selectionchange: function (sm, selections) {
                         //                        var sel = selections;
                         //                        var flieNo = selections[0].data['FileNo'].toString();
                                                 alert("111");
                         //                        pubFileNo = flieNo;
                     }
                 }
             });
                 win.show();
         }
为什么我这监听不上grid中的选择行,
还有没有别的获取GRID行的方法,求代码(刚接触EXT)
------解决方案--------------------
你这里好像有问题
listeners: {
  selectionchange: function (sm, selections) {
  // var sel = selections;
  // var flieNo = selections[0].data['FileNo'].toString();
  alert("111");
  // pubFileNo = flieNo;
  }
应该是添加在GridPanel里面,而不是在Window里面。。应该是你写错了。改为在grid里面添加监听试试
------解决方案--------------------
几个问题,
第一你的
  var selModel = Ext.create('Ext.selection.CheckboxModel', {
下面使用的时候
selModel: sm,
第二,如楼上所说
  selectionchange 是gridpanel的监听事件,并不是window的,还可以再 selModel 里监听,详细请参考api文档
其余还有些编码的问题,楼主自己仔细点了,多找找api文档以及官方提供的样例程序