Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
How can i enable my tiles(Windows 8 Apps ) to enable drag and drop. I want my tiles can be dragged and dropped within a gridview. Is there a way I can enable it. I found a post (http://www.progware.org/Blog/post/Drag-and-Drop-in-WinJSUIListView-for-repositioning-items-in-Windows-Store-Apps.aspx[^]) with a demo prog, but it is not working. I am working in javascript and html5. Does WinJS allow us to do such thing
Posted 18-Jan-13 22:47pm
Edited 18-Feb-13 6:11am
Maciej Los158.9K
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
Here is how this is done in XAML and C#:
 
http://blogs.msdn.com/b/going_metro/archive/2012/07/16/drag-and-drop-within-a-grouped-grid-view.aspx[^]
 
The key three properties to achieve the effect are these:
 
CanDragItems="True"

CanReorderItems="True"

AllowDrop="True".
 
The same properties should be available from JavaScript.
 

 
Thanks,
Frank
 

// Frank La Vigne / US Public Sector Developer Evangelist
// 30 To Launch Sign up at http://bitly.com/30ToLaunchWin8
// @tableteer / http://www.FranksWorld.com
  Permalink  
Comments
anchitgautam at 1-Feb-13 0:53am
   
Hi Frank
 
These properties are not available in JavaScript and HTML 5. Even when working using C# and setting these properties to true , it doesn't enable me to drop and rearrange though it allows a tile to drag while working on a grid template.
 
More suggestions would be appreciated.
 
Thanks
 
[REMOVED]email[/REMOVED]
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I am the writer of the link you are mentioning. I have tested again the demo program (downloaded it and run it) and it executes correctly. What is the issue?
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 120
4 DamithSL 95
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 4 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100