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.
In playing around with it some, I think it has more to do with the ultracalenderinfo min/max dates but I really haven't been able to narrow it down. Any ideas would help and I will post anything more I find.
This error also occurs even if I don't set the min/max dates of the ultracalender info. The second I scroll to the end in either direction, I get this error.
Actually I can't remember exactly how I reproduced it...I messed around with the SmallChange/LargeChange property values a bit and finally got it to happen. In any case the problem will be addressed.
Thanks and for what it's worth, I haven't seen it since I set the HorizontalScrollSettings.
-Ian
Thank you...and I think if you explicitly set the LargeChange property off that thing it clears the problem up, that might be the reason. Keep the feedback (whether it be good or bad) coming on this and any other features of that control.
No problem. I love the control thus far (the error was a minor setback) but the only thing that would make it that much sweeter is if the owner could be multiline. I know that you can set a control in there so I think you could do a multiline textbox but I haven't tried that yet.
Ian
Seems to be a bug that is not solved in current service release 2043, got the same problem. I've created a test application, after some playing with it my way to show the exception is: Start it, maximize the form and select january 24th by clicking it on the monthviewmulti on the left side.
Are there any new information? Are there workarounds? Or is there a way to restrict the date range shown in the timelineview e.g. for january 1st to january 31st and the horizontal scrollbar will only scroll within this range?
Thanks!
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.
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.