I followed this blog post to play around the the new Gantt Chart, but I noticed that when I input a Duration = new TimeSpan(8,0,0,0); I get "8 edays?" in the table for the chart.
http://ko.infragistics.com/community/blogs/mihail_mateev/archive/2012/10/07/how-to-start-using-infragistics-xamgantt-control.aspx
I also noticed that if I right click and insert task... choose a start day and end day, but then drag the task to the right over a weekend it expands an additional two days. Since my application will be used for tasks that continue on the weekend I want to disable this type of functionality.
Hello Joshua,
I am just checking your progress on the issue. If you require any further assistance please do not hesitate to ask.
The xamGantt works just like MS Project. Tasks are typically defined such that the work being done is done during "working hours". The default working hours in project are Mon-Fri 8am-12pm and 1pm to 5pm. So tasks that are using non-elapsed durations are using the working hours specified by the calendar of the project. Tasks that are using elapsed durations are essentially being treated as though the project were using a 24 hour clock (i.e. every day has 24 working hours). The "e" is used (as it is in MS Project) to indicate that the duration is "elapsed" and therefore ignores the working hours. So you can change the DurationFormat of the Project's Settings to ElapsedDays instead of the default days but as you notice you will see "edays" or similar string representation. Another alternative would be to set the calendar of the project to be a 24 hour calendar. Here's a code example of doing that:
var project = new Project();// create a 24 hour clockvar calendar = new ProjectCalendar();var days = new ScheduleDaysOfWeek();var allDay = new ScheduleDayOfWeek();var allDayHours = new WorkingHoursCollection( new TimeRange( TimeSpan.Zero, TimeSpan.FromDays( 1 ) ) );allDay.DaySettings = new DaySettings() { IsWorkday = true, WorkingHours = allDayHours };days.Monday = days.Tuesday = days.Wednesday = days.Thursday = days.Friday = days.Saturday = days.Sunday = allDay;calendar.DaysOfWeek = days;calendar.UniqueId = "24Hour";project.Calendars.Add( calendar );project.CalendarId = "24Hour";var settings = new ProjectSettings();settings.MinutesPerDay = 60 * 24;settings.MinutesPerWeek = settings.MinutesPerDay * 7;settings.DaysPerMonth = 30;settings.NewTasksAreEstimated = false;project.Settings = settings;
I have further investigated your issue. If you set duration property it will return the working hours. For example if you set Duration = new TimeSpan.FromDays(1) will return 2 additional days, because one day has 24 hours(3 x 8 working hours). In order to get the real time you have to set DurationFormat too. The question mark indicates that the time is estimated. In order not to show the question mark you can use ManualDuration
Please do not hesitate to let me know if you have any further questions.
Why does it says "days?" or "edays?" when I enter items programatically.
With the ? at the end.
I have been investigating your issue. The “e” before days that is displayed means “Elapsed days”. Those kind of day does not depend on working and non-working days. You can use the following method to set a duration to a certain task: ProjectDuration.FromFormatUnits(8, ProjectDurationFormat.Days). If you want to set Saturday and Sunday as working days for your project you can define a new ProjectCalendarWorkWeek and include them there. On the following two links you can find more information about the calendar and how to configure the task duration and format:
http://help.infragistics.com/Help/NetAdvantage/WPF/2012.2/CLR4.0/html/xamGantt_Configuring_Task_Duration_Duration_Format.html http://ko.infragistics.com/products/wpf/sample/gantt/project-calendar .