Hello everybody.
i started to development whit telerik components this days and i'm really confused with drag&drop events
(i guess that isn't a telerik components problem. hehe)
Let me explain my needs and then show my problems.
I need to create a component like the "windowns media player" (it's the basic ideia). Manipulate files (audio/video) and create playlists (with audio and/or video files)
i'm using a GridView containing all files without repeat and a TreeView containing all created playlist's and the files inside the playlist (as hierarchical items). Up there is all right, i've created all components and functions without problem.
But i need to drag&drop between them and I have some rules:
- when dragging from gridVIew and dropping in the treeView:
i need to maintain all the selected files inside the GridView and add copies in the "selected" playlist
- when dragging from treeView and dropping in the gridView:
i need to exclude all select files in the treeview (even if i select files in different playlist's) and don't create anything in the GridView
- when dragging and dropping in treeView:
i need to update the sources only if the playlist's change.
So far, i can drag from treeview and exclude the file but only one file, if i select more I got a "reference problem" in this line:
the property ParentItem is set to "null", so the ExcludeFile function can't run.
(FileDto is a Class containing properties about the files and PlaylistDto is a class containing playlist's properties)
When i'm tring to add files in the playlist (drag from GridView to TreeView) i have another problem that is: nothing!!!
yeah, nothing happens! I see the DragCue (with my template) then I drop where i want and the Cue just close without add the file in the playlist and i got no errors in the Code.
so, i guess that is "only" this... hehehe
I don't have a good english, so if you do not understand anything, just let me know and I will try to explain in another way.
I hope somebody can help me, please. =)
Thank you very much.
Luís Alberto.
By the way: Telerik is really, really great. Everyone who worked for it deserve the credit. I liked so much.
Congratulations!
i started to development whit telerik components this days and i'm really confused with drag&drop events
(i guess that isn't a telerik components problem. hehe)
Let me explain my needs and then show my problems.
I need to create a component like the "windowns media player" (it's the basic ideia). Manipulate files (audio/video) and create playlists (with audio and/or video files)
i'm using a GridView containing all files without repeat and a TreeView containing all created playlist's and the files inside the playlist (as hierarchical items). Up there is all right, i've created all components and functions without problem.
But i need to drag&drop between them and I have some rules:
- when dragging from gridVIew and dropping in the treeView:
i need to maintain all the selected files inside the GridView and add copies in the "selected" playlist
- when dragging from treeView and dropping in the gridView:
i need to exclude all select files in the treeview (even if i select files in different playlist's) and don't create anything in the GridView
- when dragging and dropping in treeView:
i need to update the sources only if the playlist's change.
So far, i can drag from treeview and exclude the file but only one file, if i select more I got a "reference problem" in this line:
ExcludeFile (draggedItem as FileDto, (e.Options.Source as RadTreeViewItem).ParentItem.Item as PlaylistDto); |
(FileDto is a Class containing properties about the files and PlaylistDto is a class containing playlist's properties)
When i'm tring to add files in the playlist (drag from GridView to TreeView) i have another problem that is: nothing!!!
yeah, nothing happens! I see the DragCue (with my template) then I drop where i want and the Cue just close without add the file in the playlist and i got no errors in the Code.
so, i guess that is "only" this... hehehe
I don't have a good english, so if you do not understand anything, just let me know and I will try to explain in another way.
I hope somebody can help me, please. =)
Thank you very much.
Luís Alberto.
By the way: Telerik is really, really great. Everyone who worked for it deserve the credit. I liked so much.
Congratulations!