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

Prevent Drag and drop between multiple RadGridView

6 Answers 115 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Navaneeth
Top achievements
Rank 1
Navaneeth asked on 27 Jan 2011, 12:36 PM
Hello,

I have two RadGridView both allows Drag & Drop of rows. We use the method explained in the article http://www.telerik.com/help/silverlight/raddraganddrop-within-radgridview.html. Since both the grids allows drag & drop, user can drag from one grid and drop on the other. This will fail as the backing datacontext for both grids are different and the type conversion fails.

I am looking for a method where the grid won't allow dropping on to the other droppable grids. Is there a way to achieve this?

Any help would be appreciated. 

6 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 27 Jan 2011, 12:57 PM
Hello Navaneeth,

you can check whether the e.Options.Payload is the correct type for the destination grid in DropQuery event and if not set e.QueryResult = false;

Best wishes,
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>>
0
Navaneeth
Top achievements
Rank 1
answered on 28 Jan 2011, 06:20 AM
Thanks and that seems to do the trick. BTW, we have another issue with the drag & drop approach. Drag & drop on a grid with more number of rows seems to be very slow. We tried it on a grid which has 70+ rows and it took around 10 seconds to drop just one row. Is there any way to fix this too?

Thanks for your help.
0
Tsvyatko
Telerik team
answered on 28 Jan 2011, 10:11 AM
Hello Navaneeth,

I suspect this could be either due to slow remove/insert operations or RowVirtualization turned off.

I can suggest the following:

 - try perform row reorder from button to eliminate drag/drop element.
 - check whether  the grid is not placed within StackPanel or RowVirtualization turned off, which could cause measuring of all rows.

Regards,
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>>
0
Navaneeth
Top achievements
Rank 1
answered on 28 Jan 2011, 11:41 AM
Thanks again for the reply. GridView has row virtualization turned on (EnableRowVirtualization="True") and it is not contained in a StackPanel. We are still facing the slowness in Drag & Drop. Is there any other property that controls the virtualization or performance of the row reorder? 

0
Milan
Telerik team
answered on 28 Jan 2011, 02:01 PM
Hello Navaneeth,

Have you tried to execute the row reorder logic without using drag and drop as my colleague has suggested?

Regards,
Milan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Tsvyatko
Telerik team
answered on 28 Jan 2011, 02:12 PM
Hi Navaneeth,

Unfortunately, we are unable suggest solution without some additional information about the specific scenario.
Could you please, open a support ticket and attach sample project that demonstrate the problem.

Kind regards,
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
DragAndDrop
Asked by
Navaneeth
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Navaneeth
Top achievements
Rank 1
Milan
Telerik team
Share this question
or