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

Grid RowDrop fires twice

2 Answers 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 25 Apr 2012, 01:58 PM
I have a RadGrid control on a page where users can reorder projects by dragging and dropping. In a stand alone version it works fine, but once placed inside the ASP content frame in the existing site, the RowDrop event fires twice. If I step through and stop the second pass through the method, the rows reorder nicely. Is there a way to cancel the event from codebehind? Do you have any suggestions about what to look for?

BTW, this control is inside an ASP content tag within a master page. The majority of the code is directly from the samples in the 2012 Q1 release samples.

Thanks in advance

2 Answers, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 25 Apr 2012, 04:14 PM
The event handler was added twice: the grid's opening tag and the code behind. Removing the definition from the tag fixed it.

Looking at the asp, one would think it's ok, but it's not apparently.

Stephen
0
Vasil
Telerik team
answered on 30 Apr 2012, 09:53 AM
Hello Stephen,

I see that you have already figure it out.
Indeed it often happens to attach the handler two times, in the Aspx markup and in the code-behind, especially when writing in VB where the handler could be attached in its own declaration.

Greetings,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or