editorgridpanel如何拖动行

jiawuxian 2012-05-14
代码:
找高手请教下,是什么地方出的问题,firefox错误提示:

sm.isSelected is not a function
var gridForShowMethod = new Ext.grid.EditorGridPanel({
            autoHeight: true,
            autoWidth: true,
            renderTo: 'ShowMethod',
            store: storeForShowMethod,
            cm: cmForShowMethod,
            enableDragDrop: true,
            enableColumnResize :false,
            trackMouseOver: true
        });
        var ddrow = new Ext.dd.DragDrop(gridForShowMethod.container, {
            ddGroup: 'gridForShowMethod',
            copy: false,
            notifyDrop: function(dd, e, data) {
                // 选中了多少行
                var rows = data.selections;
                // 拖动到第几行
                var index = dd.getDragData(e).rowIndex;
                if (typeof (index) == "undefined") {
                    return;
                }
                // 修改store
                for (i = 0; i < rows.length; i++) {
                    var rowData = rows[i];
                    if (!this.copy) store.remove(rowData);
                    store.insert(index, rowData);
                }
            }
        });
Global site tag (gtag.js) - Google Analytics