ReorderList ItemCommand not being handled

Last post 08-17-2009 10:54 PM by maduranga001. 4 replies.

Sort Posts:

  • ReorderList ItemCommand not being handled

    04-30-2008, 4:32 PM
    • Member
      2 point Member
    • BenClackson
    • Member since 04-30-2008, 8:09 PM
    • Posts 4

    I'm using the AJAX Control Toolkit for .NET Framework 3.5 with VS2008, and I have a ReorderList with a LinkButton inside the ItemTemplate like so:

    <ajaxToolkit:ReorderList ID="SelectedTextItems" runat="server" DataKeyField="Identity" SortOrderField="Order" EnableViewState="true" PostBackOnReorder="true">
      <ItemTemplate> 

         <asp:LinkButton ID="Remove" runat="server" CommandName="Remove" Text="Remove" CssClass="GeneralText" />

      </ItemTemplate>
    </ajaxToolkit:ReorderList>

    In my CodeBehind file is the following:

    Private Sub SelectedTextItems_ItemCommand(ByVal sender As Object, ByVal e As AjaxControlToolkit.ReorderListCommandEventArgs) Handles SelectedTextItems.ItemCommand
          ....
    End Sub

    But when I set the Debugger to break on the first line of this handler, I see that it is never entered. Other handlers for the ItemCreated and ItemReorder events work as expected. What is the problem with the ItemCommand event? Is this an issue with the .NET Framework 3.5 version?

  • Re: ReorderList ItemCommand not being handled

    04-30-2008, 5:21 PM
    • All-Star
      60,891 point All-Star
    • anas
    • Member since 09-21-2006, 4:31 AM
    • Palestinian Territory, Occupied
    • Posts 6,865
    • Moderator

    I think you need to set its OnItemCommand Property  to the handler Function name  ,

    <ajaxToolkit:ReorderList ID="SelectedTextItems" OnItemCommand="SelectedTextItems_ItemCommand" 

    Regards,

    Anas Ghanem | Blog

  • Re: ReorderList ItemCommand not being handled

    05-01-2008, 3:23 AM
    • Member
      2 point Member
    • BenClackson
    • Member since 04-30-2008, 8:09 PM
    • Posts 4

    That's not normally necessary in VB.NET if you use the "Handles .." syntax, and hasn't been necessary for my other ReorderList handlers, though in desperation I did try that (making the method Public and removing the "Handles .." clause) but without success. 

  • Re: ReorderList ItemCommand not being handled

    05-14-2008, 10:19 AM
    • Member
      2 point Member
    • BenClackson
    • Member since 04-30-2008, 8:09 PM
    • Posts 4

    I have discovered at least a workaround. I was using the ReorderList without a DragHandleTemplate. When I add a DragHandleTemplate the ItemCommand event is handled as expected.

  • Re: ReorderList ItemCommand not being handled

    08-17-2009, 10:54 PM
    • Member
      113 point Member
    • maduranga001
    • Member since 08-18-2008, 12:32 AM
    • Posts 179

    your solution could be here,

    Visit  http://prasadmaduranga.blogspot.com/2009/08/ajax-reorder-list-issues-and-solutions.html

    Post your feedback in the blog as a comment.

    Thanks.

    Visit for Microsoft Technical Issues and Solutions
    http://prasadmaduranga.blogspot.com/
Page 1 of 1 (5 items)