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

Can I prevent drag/drop between grids?

1 Answer 38 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Fountain
Top achievements
Rank 1
Paul Fountain asked on 11 May 2010, 09:33 PM
I have an application with two RadGrids on the page together.  I have drag/drop functionality for each grid, which works fine.  However when dragging from one grid to the other, It creates the Javascript errors copied below.  On some environments, depending on the version/settings of the browser, it can cause a 404 error.  I have tried to solve this issue by adding code to my RowDrop event handler that ignores all drops from other grids.  But these errors are happening before the RowDrop is called.

How can I prevent these errors without losing the ability to drag/drop within the same grid?

Message: Sys.WebForms.PageRequestManagerServerErrorException: Cannot find a cell bound to column name 'Tasks'
Line: 4723
Char: 21
Code: 0
URI: http://localhost/Portal/ScriptResource.axd?d=fUJMFujfF39B_MM1dA7T_Ma2RfpS-GNQI3ziev5S6xl4tV7mAyNoKGpas918t9DDxFFDHGrlJR32pG3inQwrxiDv0KhaA9jpi0IMUfn4-f01&t=ffffffffec2d9970

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 May 2010, 08:48 AM
Hi Paul,

The RowDrop client event cannot be cancelled, but the RowDropping event can. You can check in the RowDropping handler what is the destination of the dropped rows and cancel the event if it is another RadGrid.

http://www.telerik.com/help/aspnet-ajax/onrowdropping.html

Here is an example which performs a similar check:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

Kind regards,
Dimo
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Paul Fountain
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or