Completed
Last Updated: 05 Aug 2015 11:35 by ADMIN
ADMIN
Ivan Petrov
Created on: 03 Aug 2015 08:37
Category: GanttView
Type: Bug Report
0
FIX. RadGanttView - elements provided in the TimelineItemElementCreating are not used.
If one subscribes to the TimelineItemElementCreating and provides custom item elements for the timeline these elements are not used and default item elements are used instead.

WORKAROUND:

Create a custom element provider:

public class CustomGanttViewTimelineElementProvider : GanttViewTimelineElementProvider
{
    public CustomGanttViewTimelineElementProvider(GanttViewGraphicalViewElement owner)
        : base(owner)
        { }

    public override IVirtualizedElement<GanttViewTimelineDataItem> CreateElement(GanttViewTimelineDataItem data, object context)
        {
            GanttViewTimelineItemElement element = this.OnItemElementCreating(data);

            if (element != null)
            {
                return element;
            }

            return new GanttViewTimelineItemElement(data, this.Owner);
        }
}

and assign it to the timeline container element provider:

this.radGanttView1.GanttViewElement.GraphicalViewElement.TimelineContainer.ElementProvider = new CustomGanttViewTimelineElementProvider(this.radGanttView1.GanttViewElement.GraphicalViewElement);
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments