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

In IE8 Reordering same item by drag and drop more than once throwing script error.

1 Answer 54 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 14 Feb 2014, 07:49 AM
In IE8 when I do drag and drop item for first time it drops. Again if I drag and drop same item it throws script error.
Below is my RadListBox code:

 <telerik:RadListBox ID="rlbId"
                                                runat="server" 
                                                AllowReorder="true" 
                                                ShowReorder="false" 
                                                EnableDragAndDrop="true"
                                                Width="375px" 
                                                Height="400px" 
                                                SelectionMode="Single">
                                                <ButtonSettings Position="Right" VerticalAlign="Top" />  
                                           <ItemTemplate>
                                                    <table class="bottomBorder" style="border-collapse: collapse; width: 100%;">
                                                        <tr>
                                                            <td style="width: 30%; border-bottom: 1px solid black; padding: 5px; text-align: left;"><%# Eval("Code")%></td>
                                                            <td style="width: 30%; border-bottom: 1px solid black; padding: 5px; text-align: left;" align="left"><%# Eval("Name")%></td>
                                                        </tr>
                                                    </table>
                                           </ItemTemplate>
                            </telerik:RadListBox> 

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 18 Feb 2014, 12:19 PM
Hello Praveen,

I was able to replicate the described exception, which is thrown using the demonstrated implementation. I had forwarded it to our developer team for further consideration. However, I am afraid that the scenario you had implemented is not valid. When you are using the Server ItemTemplcate, an AutoPostBackOnReorder should be set to true, in order to ensure the correct reorder of the Items. You could encapsulate the RadListBox in an RadAjaxPanel , like demonstrated in this online demo.

Another possible approach is to use the ClientItemTemplate, where AutoPostBackOnReorder  does not need to be set. I have prepared a sample page for you, demonstrating a possible implementation, using the ClientItemTemplate. Please find it attached.

Regards,
Nencho
Telerik
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 UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ListBox
Asked by
Praveen
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or