search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

DataItem not available if ResourceCollection is filled manually

Asked by Oliver
5 years ago.


I think my question is more a proposed change request for the behaviour.

In the OnBeforeResHeaderRender event there is a DataItem in the event data available.

I fill the ResourceCollection manually by creating Resource objects and setting the needed data. But if I set the DataItem property (which is get; set; enabled) I still do not get this dataitem in the event. In the documentation it says that this field is only available if filled by calling LoadResources().

I think it would be nice to change this to enable user to transport some additional data that might be interesting for rendering.

In my case I have a 2 level tree. 1st level is the group name and second level are the people in the group. Now I would like to determine if I render the group header or the person header to give it different style.

Is there another way to get some more info to the event?

Thanks in advance


Answer posted by Dan Letecky [DayPilot]
5 years ago.

This change is now implemented in the latest DayPilot Pro for ASP.NET MVC build (8.3.5851). You can download it in the sandbox:

Any object passed using Resource.DataItem will be available as e.DataItem.Source in OnBeforeResHeaderRender.

Let me know if there is any problem.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.