This question is locked. New answers and comments are not allowed.
Hello again,
We've just moved from Q1 to Q2 version of Silverlight Controls. Everything is ok but parts responsible for RadGanttView functions.
Previously, to fill RadGanttView, I had this part of code:
We've just moved from Q1 to Q2 version of Silverlight Controls. Everything is ok but parts responsible for RadGanttView functions.
Previously, to fill RadGanttView, I had this part of code:
public void SetGanttItems(IEnumerable<Activity> initialSet) { Activities = new ObservableCollection<IGanttTask>(); var wrapperCollection = initialSet.Select(a => { return WrapActivity(a); }); foreach (var activity in wrapperCollection) Activities.Add(activity); }
private GanttTask WrapActivity(CMSActivity activity) { GanttTask result = new GanttTask(activity.PlannedStartDate ?? new DateTime(), activity.PlannedEndDate ?? new DateTime(), activity.Title); List<Relation> relations = new List<Relation>(); List<GanttTask> children = new List<GanttTask>(); foreach (var child in activity.Children) { GanttTask wrappedChild = WrapActivity(child); relations.Add(new Relation() { Task = wrappedChild }); children.Add(wrappedChild); } result.SetRelations(relations); result.SetChildren(children); return result; } When I migrated to new version, I cannot compile the code due to errors in method WrapActivity. Problem is that now I cannot find Relation class. I found RelationInfo, but it accepts strange objects in constructor, so I'm not sure whether should I use it, or maybe somewhere good, old Relation class still exists... I'd appreciate if someone could provide me with sample code with functionality similar to code listed above and working with Q2 version. Best regards, thank you in advance. Paweł