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

drag and drop to specific row in gridview

3 Answers 175 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 24 Nov 2017, 12:31 PM

Hi,

I found the article for this regarding Silverlight.

https://www.telerik.com/forums/drag-and-drop-to-a-specific-row-in-a-radgridview 

How can this be made to work for wpf?

Thanks ... Ed

 

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 29 Nov 2017, 10:55 AM
Hello Randy Hompesch,

Can you elaborate more on what you are trying to achieve from this forum post? This way I can get straight to a possible solution.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Randy Hompesch
Top achievements
Rank 1
answered on 29 Nov 2017, 11:29 AM

Hi,

In the referenced article on Silverlight, he showed the following code to get the row in the drop event.

void GridViewRowDropInfoHandler(object sender, DragDropEventArgs e)
{
          RadGridView order = e.Options.Destination as RadGridView;

          GridViewRow row = e.GetElement<GridViewRow>(e.Options.CurrentDragPoint);
}

Note the line where he gets what I believe is the destination row. The problem for me is that there is no e.Options in wpf. How to get the destination row in the drop event so I can know what I am dropping on?

Thanks ... Ed

 

0
Dinko | Tech Support Engineer
Telerik team
answered on 04 Dec 2017, 10:29 AM
Hi Randy Hompesch,

To get the row to the drop position you can use the DragDropPayloadManager.GetDataFromObject() method. You can take a look at the project attached to my reply in your other forum post.

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Randy Hompesch
Top achievements
Rank 1
Share this question
or