Hi
I am using the GridView similar to a table, where a long note is displayed as wrapped text over multiple lines. The problem is that the row size is not adjusting to display the entire text.
So I'm trying to use the "AutoSizeRows" property b/c my understanding from reading other posts on the forums is that it should do exactly that, but it's throwing a run time error:
And I get:
System.InvalidOperationException was unhandled
Message="MeasureOverride returned positive infinity: Telerik.WinControls.UI.GridTableHeaderRowElement"
Source="Telerik.WinControls"
StackTrace:
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.GridRowElement.Initialize(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableBodyElement.UpdateRow(Int32 position, GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableBodyElement.UpdateRowElements(IEnumerable`1 rows, RectangleF clientRect, Single& y, Int32& position, Int32 startIndex, Int32& added, Single left, Single width)
at Telerik.WinControls.UI.GridTableBodyElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.UI.GridTableElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.RootRadElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RootRadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinControls.RadElement.UpdateLayout()
at Telerik.WinControls.UI.RadGridView.set_AutoSizeRows(Boolean value)
at InsurancePro.frmTaskList.RefreshView() in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 664
at InsurancePro.frmTaskList.cmdPend_Click(Object eventSender, EventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 208
at InsurancePro.frmTaskList.frmTaskList_Load(Object eventSender, EventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 423
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at InsurancePro.frmMain.vbalExplorerBarCtl_ItemClick(Object eventSender, ExplorerBarItemClickEventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmMain.vb:line 1049
at vbAccelerator.Components.Controls.acclExplorerBar.OnItemClick(ExplorerBarItemClickEventArgs e)
at vbAccelerator.Components.Controls.acclExplorerBar.ActionFocusItem(MouseButtons button, Point location)
at vbAccelerator.Components.Controls.acclExplorerBar.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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at vbAccelerator.Components.Controls.ExplorerBarUtility.ControllableScrollableControl.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(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at InsurancePro.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
PLEASE HELP!
I am using the GridView similar to a table, where a long note is displayed as wrapped text over multiple lines. The problem is that the row size is not adjusting to display the entire text.
So I'm trying to use the "AutoSizeRows" property b/c my understanding from reading other posts on the forums is that it should do exactly that, but it's throwing a run time error:
rgvNotes.AutoSizeRows =
True
And I get:
System.InvalidOperationException was unhandled
Message="MeasureOverride returned positive infinity: Telerik.WinControls.UI.GridTableHeaderRowElement"
Source="Telerik.WinControls"
StackTrace:
at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
at Telerik.WinControls.UI.GridRowElement.Initialize(GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableBodyElement.UpdateRow(Int32 position, GridViewRowInfo rowInfo)
at Telerik.WinControls.UI.GridTableBodyElement.UpdateRowElements(IEnumerable`1 rows, RectangleF clientRect, Single& y, Int32& position, Int32 startIndex, Int32& added, Single left, Single width)
at Telerik.WinControls.UI.GridTableBodyElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.UI.GridTableElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.RootRadElement.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RootRadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
at Telerik.WinControls.RadElement.UpdateLayout()
at Telerik.WinControls.UI.RadGridView.set_AutoSizeRows(Boolean value)
at InsurancePro.frmTaskList.RefreshView() in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 664
at InsurancePro.frmTaskList.cmdPend_Click(Object eventSender, EventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 208
at InsurancePro.frmTaskList.frmTaskList_Load(Object eventSender, EventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmTaskList.vb:line 423
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at InsurancePro.frmMain.vbalExplorerBarCtl_ItemClick(Object eventSender, ExplorerBarItemClickEventArgs eventArgs) in C:\Documents and Settings\RSyed.ITC\My Documents\Visual Studio 2005\Projects\InsurancePro.Net\frmMain.vb:line 1049
at vbAccelerator.Components.Controls.acclExplorerBar.OnItemClick(ExplorerBarItemClickEventArgs e)
at vbAccelerator.Components.Controls.acclExplorerBar.ActionFocusItem(MouseButtons button, Point location)
at vbAccelerator.Components.Controls.acclExplorerBar.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.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at vbAccelerator.Components.Controls.ExplorerBarUtility.ControllableScrollableControl.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(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at InsurancePro.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
PLEASE HELP!