Show cool things you have done with our products


Post by Dev_Coppelis »

Maxim Gorkovsky wrote: Import will finish successfully. Then you will have error from asp.net backend, saying you cannot remove calendar which has children. That can be solved on the backend side:
1) Look for string 'cannot remove calendar'
2) find usages of that method and call it with force flag
Or you can refactor backend to implement more complex logic.
hello maxim,
you mean by force flag is to pass it true while calling the function
gantt.removeCalendar(calendar,true); like this ?

Post by Maxim Gorkovsky »

Yes. Alternatively you can try to change default value to 'true' in method declaration.

Post by Dev_Coppelis »

when i did it removed all calendars and it is not logic.
so what should i do to solve the issue of cannot " remove calendar which has children. "

Post by Maxim Gorkovsky »

That method only removes calendars, which were removed by client. And when you change project calendar, all previous calendars are removed, because there should be nothing, that references that calendar anymore.
You are free to change backend logic as you wish. Just place a breakpoint there and see why do you get that exception and what can you do about it.

Post Reply