This is a migrated thread and some comments may be shown as answers.

Drag Drop Not working properly

12 Answers 167 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Snehal
Top achievements
Rank 1
Snehal asked on 15 Jul 2010, 07:37 AM
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...!!!

 

 

12 Answers, 1 is accepted

Sort by
0
Snehal
Top achievements
Rank 1
answered on 16 Jul 2010, 06:22 AM
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...!!!

0
Snehal
Top achievements
Rank 1
answered on 16 Jul 2010, 01:43 PM
Hello...

from last 2 days am seeking for a solution..can anybody please help?
0
Tina Stancheva
Telerik team
answered on 20 Jul 2010, 05:34 PM
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
0
Snehal
Top achievements
Rank 1
answered on 21 Jul 2010, 06:01 AM
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.
0
Tina Stancheva
Telerik team
answered on 21 Jul 2010, 03:10 PM
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
0
Snehal
Top achievements
Rank 1
answered on 22 Jul 2010, 05:38 AM
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

0
Tina Stancheva
Telerik team
answered on 22 Jul 2010, 08:54 AM
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
0
Snehal
Top achievements
Rank 1
answered on 22 Jul 2010, 09:41 AM
Thank you very much Tina.
0
Snehal
Top achievements
Rank 1
answered on 24 Jul 2010, 05:42 AM
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...!!!
0
Tina Stancheva
Telerik team
answered on 27 Jul 2010, 02:29 PM
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
0
Snehal
Top achievements
Rank 1
answered on 28 Jul 2010, 05:42 AM
Hi Tina,

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

0
Tina Stancheva
Telerik team
answered on 29 Jul 2010, 09:43 AM
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
Tags
TileView
Asked by
Snehal
Top achievements
Rank 1
Answers by
Snehal
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or