class updates in unit view on event drag


In Unit View I have:

	switch ( event.type ){
		case "1" : return "first_event";	
  		case "2" : return "second_event";
  		case "3" : return "third_event";

and a list of sections.

If I move an event up or down the class resets to the default one, from ‘dhx_cal_event third_event’ to ‘dhx_cal_event’, I confirmed this with firebug. The same happens if I change it from one section to another. If I do an F5 everything looks good.

In Day/week/Month view works just fine.

Is there an event that I can use to resolve this?

Thank you.

are you using single unit view or multiple ones?
if there is a single unit view - please provide its configuration code.

When you are moving event in the unit view the event.type property will be reassigned to the actual id of current unit, which may cause the above effect.

it happens in both, I keep the event in the same unit, so the ID should not change.

This is a sample of the single unit.

        var sections4=[
            {key:4, label:"Unknown"}
        scheduler.locale.labels.unit4_tab = "Unknown";
            <div class="dhx_cal_tab" name="unit4_tab" style="right:680px;"></div>