Is there a way to display week numbers in the timeline column headers when having a week interval?
HI,
Have you been able to resolve your issue ? Did you have a time to take a look at the attached sample. Please let me know if you have any questions.
Regards
Hello Amlim,
Maybe one possible approach could be if you are using the property HeadTextFormat. In my sample I add additional interval - Week, with StartRange property - StartDate and following code:
private void ultraTimelineView1_VisibleDateTimeRangeChanged(object sender, VisibleDateTimeRangeChangedEventArgs e) { CultureInfo info = new CultureInfo("en-US"); Calendar cal = info.Calendar; CalendarWeekRule myCWR = info.DateTimeFormat.CalendarWeekRule; System.DayOfWeek myFirstDOW = info.DateTimeFormat.FirstDayOfWeek; string weekString = "Week: " + cal.GetWeekOfYear(e.VisibleDateTimeRange.StartDateTime, myCWR, myFirstDOW); ultraTimelineView1.AdditionalIntervals[0].HeaderTextFormat = weekString; }
private void ultraTimelineView1_VisibleDateTimeRangeChanged(object sender, VisibleDateTimeRangeChangedEventArgs e)
{
CultureInfo info = new CultureInfo("en-US");
Calendar cal = info.Calendar;
CalendarWeekRule myCWR = info.DateTimeFormat.CalendarWeekRule;
System.DayOfWeek myFirstDOW = info.DateTimeFormat.FirstDayOfWeek;
string weekString = "Week: " + cal.GetWeekOfYear(e.VisibleDateTimeRange.StartDateTime, myCWR, myFirstDOW);
ultraTimelineView1.AdditionalIntervals[0].HeaderTextFormat = weekString;
}
Please let me know if you have any questions