This question is locked. New answers and comments are not allowed.
hello
I have 2 different Rad list boxes first one is called "LeftList" and the second one called "RightList" then i have a button when it clicked it moves the selected items from the list on the left to the list on the right here is the code that i user to move items
For Each item In Me.LeftList.SelectedItems
Me.RightList.Items.Add(item)
Next
however it is giving me errors
Here is a copy of the error
Exception has been thrown by the target of an invocation.
Action details
{"Exception has been thrown by the target of an invocation."}
System.Reflection.TargetInvocationException was unhandled
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEnt ry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuarante edCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(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(Int 32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. Run(String[] commandLine)
at RetailManagementSystem.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.InvalidOperationException
Message="Element already added"
Source="Telerik.WinControls"
StackTrace:
at Telerik.WinControls.RadElementCollection.CheckElementAlreadyAdded(RadE lement element)
at Telerik.WinControls.RadElementCollection.OnInsert(Int32 index, Object value)
at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
at Telerik.WinControls.RadElementCollection.Add(RadElement value)
at Telerik.WinControls.UI.RadVirtualizedStackViewport.ResetVisualList(Poi nt scrollValue, Boolean isScrolling)
at Telerik.WinControls.UI.RadVirtualizedStackViewport.ResetValue(Point currentValue, Size viewportSize, Size extentSize)
at Telerik.WinControls.UI.RadScrollLayoutPanel.ResetScrollPos()
at Telerik.WinControls.UI.RadScrollLayoutPanel.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
InnerException:
i tried so much but i really think there is a bug in the RadListBox controls
can i get some help with this issue please
thanks
I have 2 different Rad list boxes first one is called "LeftList" and the second one called "RightList" then i have a button when it clicked it moves the selected items from the list on the left to the list on the right here is the code that i user to move items
For Each item In Me.LeftList.SelectedItems
Me.RightList.Items.Add(item)
Next
however it is giving me errors
Here is a copy of the error
Exception has been thrown by the target of an invocation.
Action details
{"Exception has been thrown by the target of an invocation."}
System.Reflection.TargetInvocationException was unhandled
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEnt ry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuarante edCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(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(Int 32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase. Run(String[] commandLine)
at RetailManagementSystem.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.InvalidOperationException
Message="Element already added"
Source="Telerik.WinControls"
StackTrace:
at Telerik.WinControls.RadElementCollection.CheckElementAlreadyAdded(RadE lement element)
at Telerik.WinControls.RadElementCollection.OnInsert(Int32 index, Object value)
at System.Collections.CollectionBase.System.Collections.IList.Add(Object value)
at Telerik.WinControls.RadElementCollection.Add(RadElement value)
at Telerik.WinControls.UI.RadVirtualizedStackViewport.ResetVisualList(Poi nt scrollValue, Boolean isScrolling)
at Telerik.WinControls.UI.RadVirtualizedStackViewport.ResetValue(Point currentValue, Size viewportSize, Size extentSize)
at Telerik.WinControls.UI.RadScrollLayoutPanel.ResetScrollPos()
at Telerik.WinControls.UI.RadScrollLayoutPanel.ArrangeOverride(SizeF finalSize)
at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
at Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
InnerException:
i tried so much but i really think there is a bug in the RadListBox controls
can i get some help with this issue please
thanks