RadListView custom drag handle definition

4 posts, 0 answers
  1. deva sudan
    deva sudan avatar
    9 posts
    Member since:
    Jan 2010

    Posted 29 Dec 2010 Link to this post

    Scenario1: I'm trying to set the custom drag handle for the list view items.    I used the below code snippet to my Listview control Image item. The below "onmousedown" event works fine for the first time of page load of Radlistview.  

       <
    ItemTemplate>
           
    <div class="rlvI">
               
    <div class="rlvDrag"
                
    onmousedown="Telerik.Web.UI.RadListView.HandleDrag(event, '<%# Container.OwnerListView.ClientID %>', <%# Container.DisplayIndex%>)">
               
    </div>
           
    <div>
       
    </ItemTemplate>

    Isssue:  Within application I'm changing the listview data and populating through AJAX method.   After the data gets rebinded in the RadListview the event is not working and not able to drag the items.   Do I need to dynamically set this event for new Listview items at runtime ?    How do I set this "onmousedown" event dynamically in the codebehind while populating the listview ? 

    Scenario2: Similar issue happens if I use the RadListViewItemDragHandle, it is throwing item_drag is null during the mousedown of the draghandle item for the second time after listview rebind.  I'm thinking the item is not set correctly for dynamically changing listview items in both the scenarios.   

     Any help is much appreciated..



    Thanks
  2. deva sudan
    deva sudan avatar
    9 posts
    Member since:
    Jan 2010

    Posted 03 Jan 2011 Link to this post

    Some more details on the same issue,   Looks like the  binding expressions to get the ClientID "Container.OwnerListView.ClientID " is returning null for the items that were getting binded using AJAX method.   The initial page load of the RadlistView is working fine for drag/drop but later if I change the content of RadListView in AJAX manner the dragged item is not getting the client ID.   
     
    <
    div class="rlvDrag"
                
    onmousedown="Telerik.Web.UI.RadListView.HandleDrag(event, '<%# Container.OwnerListView.ClientID %>', <%# Container.DisplayIndex%>)">
               
    </div>

    How do I set the client ID for the radlistview items that are rebinded dynamically on AJAX method.    Any insight on how to narrow down this issue is much appreciated.   Thanks in advance..
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 04 Jan 2011 Link to this post

    Hello,

    Based on the provided information I was not able to replicate the issue. Onmousedown event should work fine after rebind. And Container.OwnerListView.ClientID should not be null.

    If you are unable to resolve this please open a formal support ticket and send us a sample project that we can debug.

    All the best,
    Vasil
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  5. deva sudan
    deva sudan avatar
    9 posts
    Member since:
    Jan 2010

    Posted 04 Jan 2011 Link to this post

    Thanks for investigating on this issue.  I was able to figure out the problem.  Looks like my AJAX settings were not correctly done and it was missing the listview control during update.    I fixed the AJAX setting and it now works fine as expected..  Thanks again..
Back to Top