Prevent drag & drop selectively

3 posts, 0 answers
  1. Karanjit Siyan
    Karanjit Siyan avatar
    7 posts
    Member since:
    Apr 2010

    Posted 10 Jan 2011 Link to this post

    I want some sample code that shows how to selectively prevent drag of nodes in a  RadTreeView. That is, if I have some property in a a business object behind the RadTreeView such as "bool PreventDrag {get; set;}", then if this property  is set to true, the drag of that tree node should be prevented. If the property is set to false, then it should be possible to drag. I tired to do this by setting the IsDragDropEnabled property of the RadTreeView at run time when a new tree view item is selected but this does not work by changing at run time.

    I know how to prevent drop in a region once drag has started. However, I am looking for a way to prevent the drag from starting in the first place.

    Thanks,
    Karanjit
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 11 Jan 2011 Link to this post

    Hello Karanjit Siyan,

    Please, check the attached project.

    Let me know if you have any further questions.

    Kind regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Karanjit Siyan
    Karanjit Siyan avatar
    7 posts
    Member since:
    Apr 2010

    Posted 11 Jan 2011 Link to this post

    Thank you very much.

    I had to adapt it quite a bit to my application but it now works like a charm! Thank you again for your quick and rapid response. Very impressive!

    Karanjit
Back to Top