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

WPF.DragInGridsRowsReorder Example

9 Answers 61 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Richard Harrigan
Top achievements
Rank 1
Richard Harrigan asked on 10 Apr 2013, 08:28 PM
Hi,

How would you modify this program so that when dragging it shows the contents of the ID or UserName column.  Ideally this might be done when calling RowOrderBehaviorSetIsEnable(Grid1, true).  This would allow the code to handle more than 1 data format.

Thanks
Rich

9 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 11 Apr 2013, 11:27 AM
Hi Richard,

I am not sure I understood your question correctly, but, using the example, you can modify the DraggedItemTemplate in the GridView Resources to show any of the dragged item properties. 

Is that what you are looking for? 

All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 11 Apr 2013, 12:04 PM
Hi Nik

I was referring to another example with two side by side grids.  I got that working but the example did not have a data template in xaml where I could change the displayed content..  I originally was going to try your example but it does not show all the xaml code.  Could you send me a compilable version of the example.  Or please explain in detail how to get the examples myself.  I've tried before without success.

Thanks
Rich
0
Nick
Telerik team
answered on 11 Apr 2013, 01:17 PM
Hi Richard,

I am attaching an example with the RowReordering behavior. 

Hope it helps! 

Kind regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 11 Apr 2013, 02:13 PM
Hi Nik

The example did not compile.  I got the following error:

The project file contains a property value that is not valid'

Thanks
Rich
0
Nick
Telerik team
answered on 11 Apr 2013, 02:34 PM
Hello Richard,

May I ask you for some additional information? 
What is the Version of our controls you are using? What is the Visual Studio version you are compiling the project on? 

Looking forward to your response! 

All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 11 Apr 2013, 05:46 PM
Hi Nik

Version 2013.1.220.40
Runtime version V4.0.30319

Express 2012 for Windows Desktop

Rich
0
Nick
Telerik team
answered on 15 Apr 2013, 10:21 AM
Hello Richard,

That is very strange. We are able to build it on every machine we have. 
Can you change the runtime of the project to .Net 4.0 instead of ClientProfile and see if that helps?

Looking forward to your reply! 

Kind regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Richard Harrigan
Top achievements
Rank 1
answered on 15 Apr 2013, 12:33 PM
Hi Nik,

More strangeness.  I downloaded the app again and this time it the app worked???  I also tried it out with 4.0 and 4.5 and that also worked.  But know for the really strange part.  When I open the xaml file I get squiggle lines for GridViewRow and any other GridViewRow related property.  How do I still get a clean compile and the app works???

i.e
GridviewRow, DragDropManager does not exist in namespace

<Style TargetType="telerik:GridViewRow"

x:Key="DraggedRowStyle">

<Setter Property="telerik:DragDropManager.AllowDrag"

Value="True" />

<Setter Property="telerik:DragDropManager.TouchDragTrigger"

Value="TapAndHold"/>

</Style>



Thanks
Rich

0
Richard Harrigan
Top achievements
Rank 1
answered on 15 Apr 2013, 01:25 PM
Hi Nik,

I deleted the Lib folder and the xaml errors went away.  I will review your example and get back to you if I have any questions (I probably will, I'm not the sharpest knife in the drawer).

Thanks
Rich
Tags
DragAndDrop
Asked by
Richard Harrigan
Top achievements
Rank 1
Answers by
Nick
Telerik team
Richard Harrigan
Top achievements
Rank 1
Share this question
or