locked
reorder list OnItemReorder not fire RRS feed

  • Question

  • User-119976995 posted

    I have a reorder list:

    <asp:ReorderList ID="ReorderList1" runat="server" AllowReorder="True"
            DataKeyField="Code" DataSourceID="AccessDataSource1" Font-Size="Large"
            Height="335px" PostBackOnReorder="False" SortOrderField="ListOrder" OnItemReorder="Change_List_Order"
            Width="551px">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("ItemDesc", "{0}") %>'></asp:Label>
            </ItemTemplate>
        </asp:ReorderList>
        <asp:DragPanelExtender ID="ReorderList1_DragPanelExtender" runat="server"
            DragHandleID="ReorderList1" Enabled="True" TargetControlID="ReorderList1">
        </asp:DragPanelExtender>

    Protected Sub Change_List_Order(ByVal e As ReorderListItemReorderEventArgs, ByVal sender As Object)

    Msgbox ("Test message")

    End Sub

    The function Change_List_Order does not execute.  Anything I'm missing? Thx.

    Friday, March 28, 2014 3:50 AM

Answers

  • User-417640953 posted

    Protected Sub Change_List_Order(ByVal e As ReorderListItemReorderEventArgs, ByVal sender As Object)

    Msgbox ("Test message")

    End Sub

    Hi noguchi,

    Thank you post the issue to our forum.

    The function Change_List_Order is the code behind method. You should do a postback, when the event "OnItemReorder" occurs.

    So you should set the ReorderList attribute "PostBackOnReorder" as "True" not "False".

         Height="335px" PostBackOnReorder="False" SortOrderField="ListOrder" OnItemReorder="Change_List_Order"

    It should be like below.

    <asp:ReorderList ID="ReorderList1" runat="server" AllowReorder="True" 
             DataKeyField="Code" DataSourceID="AccessDataSource1" Font-Size="Large"
             Height="335px" PostBackOnReorder="True" SortOrderField="ListOrder" OnItemReorder="Change_List_Order"
             Width="551px">

    Hope that helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 31, 2014 2:28 AM