This seems like a bug to me. The docs say the Task Project propery sets or gets the project associated with the task. Other code I have shows that the set property works, but this shows that the get does not
Create a new Windows Froms c# project, then put an UltraCalendarInfo on the form an use this code for your Form1.cs The last assert demonstrates the bug.
using
System;
System.Collections.Generic;
using System.ComponentModel;
System.Data;
System.Drawing;
System.Linq;
System.Text;
System.Windows.Forms;
Infragistics.Win.UltraWinSchedule;
Infragistics.Shared;
System.Diagnostics; // for Debug
namespace
WindowsFormsApplication4
{
Form
Form1()
InitializeComponent();
t.Project = p;
Debug.Assert(null != p);
}
Not sure why the code looked like that in the post, anyway, the form1.cs is attached in the file form1.zip
Hello app3lam,
You could assign a project to a task using an approach like the following:
Project p = this.ultraCalendarInfo1.Projects.Add("FirstProject", DateTime.Today); p.Key = "s"; Task t = ultraCalendarInfo1.Tasks.Add(DateTime.Now, TimeSpan.FromDays(2), "1", p.Key); t.Project = p;
Please do not hesitate to contact us if you need any additional assistance.