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

RadGridView Reorder rows

10 Answers 746 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
troy
Top achievements
Rank 1
troy asked on 14 Jul 2011, 03:05 PM
Your example for the Reorder rows is very good with the exception that I can't show the DropPreviewLine.  In the silverlight documentation it shows an example for it with the preview line, but neither the silverlight or WPF demo example have the preview line.  I am hoping that you have a WPF example that will show the preview line as well.

Thanks!

Troy

10 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 19 Jul 2011, 03:32 PM
Hello Troy,

You may refer to this blog post. It illustrates a project that implements row reordering in RadGridView and displays a drop position indicator. Please, let me know whether this approach, meets your requirements.

Best wishes,
Ivan Ivanov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
troy
Top achievements
Rank 1
answered on 19 Jul 2011, 03:57 PM
I was looking for something more in line with how the tree view drop indicator looks since I am using drag and drop in both the tree view and grid view.  I would prefer they be consistent.  This is a link to a silverlight example in the help document:
http://www.telerik.com/help/silverlight/raddraganddrop-within-radgridview.html

Thanks!

Troy
0
Tsvyatko
Telerik team
answered on 20 Jul 2011, 08:38 AM
Hi Troy,

 I have prepared sample application, that provide same functionality as the one in the Silverlight article mentioned. Please, have a look at the attachment and let us know if you have any further questions.

Best wishes,
Tsvyatko
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
troy
Top achievements
Rank 1
answered on 20 Jul 2011, 01:14 PM
This is exactly what I was looking for.  Thank you very much!
0
Andrew
Top achievements
Rank 1
answered on 10 Nov 2014, 09:56 PM
Has this solution been updated using the new (non deprecated) drag drop manager? Or is there a more current method of handling this? Thanks.
0
Boris
Telerik team
answered on 11 Nov 2014, 07:58 AM
Hello Andrew,

A more up to date implementation of the demo you can look into the RowReorder WPF / Silverlight example. In addition, you can check the DragDropManager documentation for more details on how to use it.

I hope this helps.

Regards,
Boris
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Thijs
Top achievements
Rank 1
answered on 21 Jun 2016, 12:19 PM

Boris, thanks for the update! One question though, in the deprecated WPF example, it shows a nice line as a drop position feedback tool instead of this weird tooltip debug message. 

 

Is this behavior (having a nice line between the rows where you will drop the dragged item) still possible in the current iteration of telerik's (silverlight) radgridview? 

 

Radtreeview does it natively without much hassle, and I very much prefer the clean drop line over the tooltip with text. 

 

Thanks 

Thijs

0
Dilyan Traykov
Telerik team
answered on 22 Jun 2016, 10:19 AM
Hello Thijs,

I believe the Drag and Drop Within RadGridView demo from our SDK Samples Browser  the desired behavior. Of course, you are free to modify that to suit your requirements.

Could you please have a look at it and let me know if it works for you?

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Thijs
Top achievements
Rank 1
answered on 22 Jun 2016, 12:40 PM

Dear Dilyan, 

Thank you for your answer. Unfortunately that example also uses the descriptive tooltip "Dragging Item before/after rowitem" instead of a "droppreviewline" 

 

To clarify please see the two attached files from your demo site. 

The behavior I'd like to enable or implement is the IsDropPreviewLineEnabled functionality, but on a gridview. 

 

So to just have a thin colored line to show the position where the item will inserted after a drop instead of a tooltip describing where it will drop. 

So, of these 2 screenshots, the one shown in "RadTreeView_TreeViewDragAndDrop_060" is the one I want.. 

 

But then on a radgridview instead of a treeview. 

 

Any idea if at all possible?

 

0
Dilyan Traykov
Telerik team
answered on 22 Jun 2016, 01:18 PM
Hello Thijs,

This is indeed possible, using the aforementioned SDK example. The only modification you need to make is to remove the following lines from the OnDragInitialize method of the RowReorderBehavior:

e.DragVisual = new DragVisual()
{
    Content = details,
    ContentTemplate = this.AssociatedObject.Resources["DraggedItemTemplate"] as DataTemplate
};

You could also modify the drop position feedback presenter in the CreateDefaultDropPositionFeedback method and change the created Ellipse's Fill color to White to exactly match the RadTreeView implementation.

I hope this produces the desired behavior.

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
DragAndDrop
Asked by
troy
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
troy
Top achievements
Rank 1
Tsvyatko
Telerik team
Andrew
Top achievements
Rank 1
Boris
Telerik team
Thijs
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or