Pb - Timeline duplicate event between different users

Hello,

i’m using the multiselect http://docs.dhtmlx.com/scheduler/multiselect.html

I try to duplicate an event between different users on my timeline view.
I have different users on my timeline and when i create a new event, i can choose different users for the event with the multiselect selection.

But the event is not displaying on screen for each users i chose in the multiselect. The event only appears for the initial user i created the event.

How can i do to display and duplicate the event for all users i choose in my multi selection?

Thanks in advance!!

Hi,
there is no built-in way to do it. It can be achieved if you overwrite inner scheduler.get_visible_events method that gets events to be rendered, and alter multiuser events. Firstly you should call the default one, to get array of events, then iterate it and find ones that must be shown against several users and make duplicates for them(full copies with different section_id values) and add them to the result array[code] var oldGetEvents = scheduler.get_visible_events;
scheduler.get_visible_events = function(){
var evs = oldGetEvents.apply(scheduler, arguments);
if(!scheduler.matrix[scheduler.getState().mode])
return evs;//default behavior for non-timeline views

		var res = [];
		for(var i=0; i < evs.length; i++){
			//if single user event then push event to result
			//else, if multiuser event - make duplicates and add them to the result
		}
		
		return res;
	};

[/code]

Ok thanks a lot :smiley:!!

I will try it and let you know how it’s working :wink:

Hello,

Did you manage to do this? I need some help.

Thank you in advance