My timeline is set up by default to show a year w/ month intervals. I have the ultracalendarinfo min and max dates set to this year as well. When the begin date gets changed to show more than a year, I set the min date for the ultracalenderinfo to the new begin date and everything looks fine. But when I use the scrollbar on the timeline view to scroll back, I get an unhandeled exception w/ the scrollbar. The scrollbar doesn't appear to refresh after the timelineview does and this is a copy of the error I get:
System.ArgumentOutOfRangeException was unhandled Message="Value must be between the minimum and maximum values.\r\nParameter name: Value" Source="Infragistics2.Win.v9.2" ParamName="Value" StackTrace: at Infragistics.Win.UltraWinScrollBar.ScrollBarInfo.set_Value(Int32 value) at Infragistics.Win.UltraWinScrollBar.ScrollBarInfo.OnScroll(ScrollEventArgs e) at Infragistics.Win.UltraWinScrollBar.ScrollBarInfo.OnScrollHelper(ScrollEventType type, Int32 newValue) at Infragistics.Win.UltraWinScrollBar.ScrollBarInfo.EndThumbDrag() at Infragistics.Win.UltraWinScrollBar.ScrollThumbUIElement.OnMouseUp(MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e) at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e) at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e) at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at BLAH.Main() in C:\BLAH\BLAH\BLAH\BLAH\Program.cs:line 140 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Is there some property I am missing or should be resetting when I change the begin date of my timelineview? The date range can only go back but not forward for what it is worth.
Mr. Plow, this is a bug that will be addressed in the next service release. Thank you for bringing it to our attention, and also for providing a reliable way to reproduce it.
MrPlow-
I didn't take a look at your project (as you stated), I was just relaying what resoved the issue I was having. I will however, check yours out too.
Ian
You did not look into my example, I am setting HorizontalScrollSettings. Seems to be a problem with the scroll range. Setting MinDate/MaxDate in my example is not a solution and not a workaround because it restricts the selection in other attached controls like MonthViewMulti. But maybe it could be a workaround to use a second UltraCalendarInfo dedicated to use with the TimelineView.
Edit: I tried, seems really to be a problem with the scrolling. When changing the SelectedDateRange in CalendarInfo1 i set the MinDate/MaxDate of CalendarInfo2 (that is used by the TimelineView) to those StartDate/EndDate and applied the same SelectedDateRange to this CalendarInfo, but the TimelineView does not automatically move to the new valid range. Then calling EnsureDateTimeVisibile with MinDate causes the exception because the TimelineView tries to scroll to a value outside the current (and still not updated) scroll range. I see the scrollrange is updated e.g. when clicking the bar of the scrollbar.
I still do not understand what range the TimelineView uses for display. It's not the range specified by the CalendarInfo and it's not the range set by SelectDateTimeRange in the TimelineView. By the way, my previous solution was to use UltraChart with ChartType GanttChart and I think I'll keep using this implementation till TimelineView works correctly.
I set the "HorizontalScrollSettings" to fix my problem in addition to setting the "MinDate" field.
Yes there is a way to limit the range on the CalenderInfo object:
Example:
CalendarInfo.MinDate = new DateTime(DateTime
.Now.Year - 2, 8, 1);
This effectively sets a begin date to the ultratimelineview control hooked to the info object. It took me a while to understand these scheduling controls.
But i find that understanding the CalendarInfo objects is key to understand these controls.
Unfortunately i must say that the documentation for the scheduling controls leaves a lot to be desired. Luckily there are lots of samples and this forum.