This is a migrated thread and some comments may be shown as answers.

[Solved] URGENT : Silverlight clipboard throwing error when data copied from RadWindow

3 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shiva
Top achievements
Rank 1
Shiva asked on 09 Dec 2010, 10:25 AM
Hi,

In our project we have a requirement to open a pop up from a main page. For this, we are using telerik rad window because its features fulfills all what we need. As part of the requirement, user should be able to copy the data from the pop up window and paste the same on the main page. This works fine few times (i.e. copying and pasting data from pop up to main page). But repeating this process of copying and pasting is causing the silverlight clipboard throwing error. As part of the copy process, we are just copying a word so the data getting copied is not heavy or large in any form.

Below is the snapshot of the error we are getting.

[ArgumentOutOfRange_Index]
Arguments: 
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50917.0&File=mscorlib.dll&Key=ArgumentOutOfRange_Index
Parameter name: index
  
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at Telerik.Windows.Controls.GridView.Clipboard.Writers.WriterBase.RemoveUnnecessaryColumns(List`1 dataItemsMatrix, IEnumerable`1 columns)
   at Telerik.Windows.Controls.GridView.Clipboard.Writers.WriterBase.GetSelectedItemsAsObjectMatrix(CellInfoCollection selectedCells)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CopyToClipboard()
   at Telerik.Windows.Controls.GridView.GridViewDataControl.CopyExecuted(Object sender, ExecutedRoutedEventArgs e)
   at Telerik.Windows.Controls.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at Telerik.Windows.Controls.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at Telerik.Windows.Controls.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
   at Telerik.Windows.Controls.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
   at Telerik.Windows.Controls.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
   at Telerik.Windows.RadRoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at Telerik.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RadRoutedEventArgs routedEventArgs)
   at Telerik.Windows.EventRoute.InvokeHandlersImpl(Object source, RadRoutedEventArgs args, Boolean raisedAgain)
   at Telerik.Windows.RadRoutedEventHelper.RaiseEvent(DependencyObject element, RadRoutedEventArgs args)
   at Telerik.Windows.Controls.RoutedCommand.ExecuteImpl(Object parameter, UIElement target)
   at Telerik.Windows.Controls.RoutedCommand.Execute(Object parameter, UIElement target)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.OnKeyDown(KeyEventArgs e)
   at System.Windows.Controls.Control.OnKeyDown(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Can you please assist us on this as this is really important for us??

Regards,
Shiva

3 Answers, 1 is accepted

Sort by
0
Shiva
Top achievements
Rank 1
answered on 09 Dec 2010, 11:28 AM
More updates for the group.....

On further analysis, I figured out that the error actually comes up when the radgrid cell of the main window is copied. The error appeared when I accidently pressed ctrl+c on the cell of the main page grid.

Any pointers will be highly appreciated.

Cheers,
Shiva
0
Yavor Georgiev
Telerik team
answered on 09 Dec 2010, 12:23 PM
Hi Shiva,

 Would it be possible for you to open a separate support ticket and attach a small sample application that exhibits this behavior? Regrettably, we were unable to reproduce this error locally. Any details about your scenario and environment will be very much appreciated.

All the best,
Yavor Georgiev
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Shiva
Top achievements
Rank 1
answered on 09 Dec 2010, 12:29 PM
Dear Yavor,

Many thanks for your response on this issue. I was about to update the thread that I have identified the cause of the problem and has fixed it.
Actually the cause of the problem was that selection mode and selection unit properties of the grid had Multiple and FullRow values respectively. This was causing full row to get copied and this was throwing the error.

I do not have any requirement of allowing multiple selections to user so I changed the settings accordingly and it worked.

Thanks for taking out your time to see this issue.

Regards,
Shiva
Tags
GridView
Asked by
Shiva
Top achievements
Rank 1
Answers by
Shiva
Top achievements
Rank 1
Yavor Georgiev
Telerik team
Share this question
or