Drag Drop Not working properly

13 posts, 0 answers
  1. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 15 Jul 2010 Link to this post

    Hello Telerik Team,

    For understanding my problem first please see attached file.

    When am dragging Order (Order-09 in orderdetail tab of Tour 2) & dropping to Tour 3, am getting reference of Tour 1 instead of Tour 3. Am using Drag & Drop control of Telerik only. DropInfo am handling like below:

    If

     

     

    e.Options.Status = DragStatus.DropComplete Then   

     

        Dim row As RadTileViewItem = TryCast(e.Source, RadTileViewItem)
    End IF

    row am aspacting tour 3 content not Tour 1. This thing happens randomly and am not able to track when it gives me wrong reference.

    Solution: if am maximized Tour 3 and again maximized tour 2. if now am dropping same then i am getting tour 3 row which i want.

    One thing am doing is While TileStateChanged am checking if it is maximized item then Item Max Height/Width equals to Windows Max Height/Width other wise it restricted to 200 as am want some specific size of box.

    Is that the reason or something else? 

    Thanks...!!!

     

     

  2. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 16 Jul 2010 Link to this post

    Hello Telerik team,

    Instead of e.Source, I changed a logic to from CurrentDragPoint find the visual parent. but in that also am not able to find RadTileViewItem. can u please help me out for the same?

    Am droping order to TileViewItem Area. row are always nothing even sometime elements also nothing.

            If e.Options.Status = DragStatus.DropComplete Then

                Dim elements = VisualTreeHelper.HitTest(rtvTour, e.Options.CurrentDragPoint)

                
                Dim row As RadTileViewItem = FindVisualParent(Of RadTileViewItem)(TryCast(elements.VisualHit, 
                                                                                            FrameworkElement))

                If row IsNot Nothing 
                     ' Do something
                End If

            End if

        Private Shared Function FindVisualParent(Of T As UIElement)(ByVal element As UIElement) As T
            Dim parent As UIElement = element
            While parent IsNot Nothing
                Dim correctlyTyped As T = TryCast(parent, T)
                If correctlyTyped IsNot Nothing Then
                    Return correctlyTyped
                End If

                parent = TryCast(VisualTreeHelper.GetParent(parent), UIElement)
            End While

            Return Nothing
        End Function

    Please do needful.... THanks...!!!

  3. UI for WPF is Visual Studio 2017 Ready
  4. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 16 Jul 2010 Link to this post

    Hello...

    from last 2 days am seeking for a solution..can anybody please help?
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 20 Jul 2010 Link to this post

    Hello Snehal,

    In order to get the TileViewItem you can use the ParentOfType() method when the drop destination isn't the TileViewItem but an element or panel inside it. And then if the destination RadTileViewItem isn't Nothing, you can apply some custom logic for the drop operation.
    Dim destination As RadTileViewItem = TryCast(e.Options.Destination, RadTileViewItem)
    If destination Is Nothing Then
        destination = e.Options.Destination.ParentOfType(Of RadTileViewItem)()
    End If
    If e.Options.Status = DragStatus.DropComplete AndAlso destination IsNot Nothing Then
    ...

    I prepared a sample project illustrating this approach. Please take a look at it and let me know if it works for you.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 21 Jul 2010 Link to this post

    Hello Tina,

    Thanks for reply.

    I tested given project but having same problem which am facing. Let me tell you the squence.

    1) Type 0 is maximized. Dragging Product 0.0 & Dropping to Type 1 Content area ( not header area).
             By doing this Product 0.0 moves to Type 1.
    2) Type 1 is maximized. Dragging Product 0.0 & Dropping to Type 2 Content area (not header area).
            By doing this Expected result should be item moves to Type 2 Grid.
            BUT it moves to Type 0 again.

    Same thing happen for me.
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 21 Jul 2010 Link to this post

    Hello Snehal,

    Thank you for the calrification. I was able to rerpoduce the issue. We found a way to fix it in the RadDragAndDropManager control. The fix will be available with the internal buld this Friday. 

    I hope this time frame is acceptable for you.

    I also updated your Telerik points accordingly.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 22 Jul 2010 Link to this post

    Hi Tina,

    can u please let me know for this error do you give me any patches or what? to get new updated control what i have to do? can u provide here?

    Thanks & Regards

  9. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 22 Jul 2010 Link to this post

    Hi Snehal,

    The fix for the issue will be available with the internal build due tomorrow. Once the internal build is out, you can download the updated binaries from the Download section of your account and test the project with them.

    Kind regards,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 22 Jul 2010 Link to this post

    Thank you very much Tina.
  11. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 24 Jul 2010 Link to this post

    Hi Tina,

    as you told that internal build you will get it by Friday. but am not got any internal builds. when am opening internal build it says:

    No internal builds for your products have been uploaded recently.

    Can u please help me out?

    Thanks...!!!
  12. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 27 Jul 2010 Link to this post

    Hello Snehal,

    In the Downloads section of your account, there is a link to the Free trials section where you can download the latest trial internal build.

    Regards,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Snehal
    Snehal avatar
    22 posts
    Member since:
    Jul 2010

    Posted 28 Jul 2010 Link to this post

    Hi Tina,

    Those control for silverlight. and we are talking about WPF. What can i do for that control?

  14. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 29 Jul 2010 Link to this post

    Hi Snehal,

    The reason you do not see the latest internal builds for WPF is because they are related to our Q1 2010 RadControls for WPF release and you haven't downloaded it.

    Once you download it, you will be able to download the latest internal build as well.

    Best wishes,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready