Results 1 to 3 of 3

Thread: EditorGrid + Drap&Drop:JS Error

  1. #1

    Default EditorGrid + Drap&Drop:JS Error

    Hi,

    I've combined an EditorGridPanel with the "Grid Drag and Drop Reorder Rows" Plugin (http://www.extjs.com/forum/showthread.php?t=21913). When I click now on a cell, I can edit it but I got this message in the background:
    Code:
    c.isSelected is not a function
    [Break on this error] var swfobject=function(){var E="undefine...}});Ext.grid.GroupingView.GROUP_ID=1000;ext-all.js (Zeile 11)
    What does it mean? What's wrong?

    Sample can be seen on http://download.prodigy7.de/files/re...rray-grid.html

    prodigy7

  2. #2
    Ext User
    Join Date
    Oct 2008
    Location
    Ger
    Posts
    178

    Default

    i was having the same problem with this plugin yesterday. but i was too lazy to found a solution to get it work....

    at the moment i do not use the plugin anymore. i use this for drag drop

    Code:
    this.theRightGrid.on('render', function(grid) {
                var secondGridDropTargetEl = grid.getView().scroller.dom;
                var secondGridDropTarget = new Ext.dd.DropTarget(secondGridDropTargetEl, {
                        ddGroup    : 'rightGridDDGroup',
                        copy:false,
                        notifyDrop  : function(ddSource, e, data){
                                var sm = grid.getSelectionModel();
                                var rows = sm.getSelections();
                                var cindex = ddSource.getDragData(e).rowIndex;
                                for (i = 0; i < rows.length; i++) {
                                    rowData = grid.store.getById(rows[i].id);
                                    if(!this.copy) {
                                        grid.store.remove(grid.store.getById(rows[i].id));
                                        if(cindex) {
                                            grid.store.insert(cindex,rowData);
                                        }
                                        else { // moves items to last position
                                            var totalItems = grid.store.data.length;
                                            grid.store.insert(totalItems,rowData);
                                        }
                                        
                                    }
                                }
                            }
                            return true;
                        }
                  });
            });

  3. #3

    Default

    I found this hint http://www.extjs.com/forum/showthread.php?t=52177 but I don't understand what this should mean. An more specific hint would maybe help.

    Edit: Okay ... was too easy. Simply add this
    Code:
    sm: new Ext.grid.RowSelectionModel()
    on the gridPanel and the error is gone. Source: http://www.extjs.com/forum/showthread.php?t=16124

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •