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

[Solved] Unhandled scrolling exception

2 Answers 133 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.
neo e
Top achievements
Rank 1
neo e asked on 19 Jan 2011, 03:23 PM
I have gridview which has a custom cell that contains a listbox, in that listbox, drag drop are enabled for the items. when dragging item in the gridview, I got the following unhandled exception:

   at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
   at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
   at System.Windows.UIElement.TransformToVisual(UIElement visual)
   at Telerik.Windows.Controls.GridView.Scrolling.GridViewScrollViewerAdapter.GetCoordinatesStartPoint(UIElement targetVisual, Point currentPoint)
   at Telerik.Windows.Controls.GridView.Scrolling.ScrollViewerCoordinator.AdjustScrollViewer(IScrollViewerAdapter viewerAdapter, Point currentPoint)
   at Telerik.Windows.Controls.GridView.Scrolling.ScrollViewerCoordinator.scrollViewerScrollTimer_Tick(Object sender, EventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

the thing is I can't try catech the exception from my code, it seems like it's coming from the gridview internal logic. is this a known issue?

Thanks

2 Answers, 1 is accepted

Sort by
0
neo e
Top achievements
Rank 1
answered on 19 Jan 2011, 05:29 PM
Nevermind, figured out the issue already. I think when setting gridview selection mode to "extended" and enable gridrow drag drop at the same time produce some interesting result. when the user try to select multiple rows by dragging the mouse and at the same time the drag event kicks in, this is an unwanted behavior. is there any way to set priority to these events e.g. row selection execute first?
0
Tsvyatko
Telerik team
answered on 21 Jan 2011, 02:11 PM
Hi neo e,

 In order to approve or not drag drop operation in current situation you can use DragQuery event and set e.query result to approve or not drag operation.

For adjustment of the select items behavior you can also check DragElementAction property of the RadGridView which is of type DragAction - http://www.telerik.com/help/silverlight/telerik.windows.controls.gridview-telerik.windows.controls.gridview.selection.dragaction.html.

Let me know if you have any further questions.

Greetings,
Tsvyatko
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
neo e
Top achievements
Rank 1
Answers by
neo e
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or