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.
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
0
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
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.
Thanks for your help.
0
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
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
Hello Navaneeth,
Milan
the Telerik team
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
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
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>>