Search code examples
javascriptdragredips.drag

redips - REDIPS.drag.enableDrag('init') gives error "'Cannot read property 'nestedGroup' of undefined"


when I try to reinitialize my redips div elements in my table I do this:

REDIPS.drag.enableDrag('init');

Redips fails on the following source code:

tableTop = function (obj) {
    var e,      // element
        i,      // loop variable
        tmp,    // temporary storage (needed for exchanging array members)
        group;  // tables group
    // find table for clicked DIV element
    e = findParent('TABLE', obj);
    // set tables group
    group = e.redips.nestedGroup;
    ...

With the following error:

Cannot read property 'nestedGroup' of undefined

Help please!


Solution

  • I initiated redips before my table was created dynamically. You have to call REDIPS.drag.init(); after the table was created.