External drag-in in units view error

I use dhtmlxScheduler v2.3 together with dhtmlxTree v2.6.

Next to the default day, week and month views, I created a timeline and units view. I used dhtmlxTree to generate a list with all of our customers with their tickets. They can be dragged into the scheduler. In the day, week, month and timeline view everything goes well, but in the units view when I drop, it doesn’t drop. I have to click again to open the lightbox.

Strange thing is, when I drag-n-drop in the day view, then switch to the units view, drag-n-drop a ticket there, everything goes well, but when I save or close the form and then drag-n-drop again (in the units view), it doesn’t work anymore.

Do I have to reset anything or something?

My code for timeline (This one works perfect):

[code]scheduler.locale.labels.timeline_tab = “Timeline” // Tekst op de tab
var groepen = [];
url: APP_URL + ‘ajax.php’,
dataType: ‘json’,
data: ‘do=getMedewerkersInGroep’ + urlParams,
async: false,
success: function(json){
groepen = json;

    section_autoheight: false,
    name: "timeline",
    x_unit: "minute",
    x_date: "%H:%i",
    x_step: 30, // Hoeveel x_unit per vakje
    x_size: 27, // Het aantal vakjes (x_unit)
    x_start: 14, // Het start vakje
    x_length: 16, // Hoeveel stapjes heb ik nodig voor een hele dag
    y_unit: groepen, // Welke groepen moeten zichtbaar zijn
    y_property: "section_id", // wbn_medewerker_id werkt niet, gewijzigd in section_id
    render: "tree", // Laten zien als tree, dus kunnen in- en uitklappen
    folder_events_available: false, // Evenement per map (categorie) instellen

Here’s my code for the units view (Here it goes wrong):

scheduler.locale.labels.persoon_tab = "Persoon" // Tekst op de tab
    var personen = [];
        url: APP_URL + 'ajax.php',
        dataType: 'json',
        data: 'do=getMedewerkers' + urlParams,
        async: false,
        success: function(json){
            personen = json;


The “personen” (persons) are called through AJAX, JSON output there is:

[{"key":"1","label":"Administrator"},{"key":"210","label":"Danielle"},{"key":"217","label":"Ivo"},{"key":"203","label""Jaap"},{"key":"220","label":"Jacco"},{"key":"212","label":"Jan Willem"}]

The code for onExternalDragIn:

[code]scheduler.attachEvent(“onExternalDragIn”, function (id, source, event){
// Drag-n-drop op true zetten
dnd = true; // Global variable

    // Het volledige label
    var label = tree.getItemText(tree._dragged[0].id).replace(/\"/g, '');

    // Do some things with the label to extract the ticket number

    return true;


Try replacing your dhtmlxscheduler_outerdrag.js, I have attached latest version.

Best regards,
dhtmlxscheduler_outerdrag.zip (643 Bytes)

Thanks for the quick reply, but still no luck. The file in this thread is identical to the file in my project. I tried though, but still no luck in the unit screen.

The error I get in firebug:

H is undefined http://framework/crm/assets/scheduler/ext/dhtmlxscheduler_units.js Line 9

Since the code is minified, I can’t seem to locate the exact location.


Please change dhtmlxscheduler_units.js file as well (property.js is uncompressed version).

Best regards,
dhtmlxscheduler_units.zip (4.07 KB)

The dhtmlxscheduler_units.js did the trick. Thanks very much!

I tested this in Firefox 4.0, IE9 (IE9 mode, IE8 mode and IE7 mode), looks like it works on all!