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

Single row with multiple drag items

3 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tor
Top achievements
Rank 1
Tor asked on 06 Jun 2013, 01:39 PM
I want to make a row with column headers with characters 'A' to 'Z', and then be able to drop items beneath these headers on a single row.
For example, item 1 can be dragged to column B, and item 2 to column H.
Is this even possible?

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 10 Jun 2013, 08:23 AM
Hello Tor,

The scenario is quite achievable. The only difference with our examples is that you have to be looking for the target GridViewCell, instead of row. 

Take a look at this example. The same is available in your local copy of our WPF demos. 

Hope it helps! 

Regards,
Nik
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Tor
Top achievements
Rank 1
answered on 10 Jun 2013, 03:27 PM
Not totally sure how to do that. I think I have to remove the ItemsSource list of the RadGridView since every item takes up a row. Then make my columns, and make a new empty row(?) and then use the GridViewCell in the GridViewDragDropBehavior.OnDrop() , onDragInitialize() and OnDragDropCompleted() methods? And use some kind of converter from my objects to a string representation in the GridViewCell.

I can't seem to get the GridViewCell as a variable to work with though.
Can you please give a more in depth explanation?
Thank you for your reply.
0
Nick
Telerik team
answered on 12 Jun 2013, 01:39 PM
Hi Tor,

You can look into this example(the same is available in your local copy of our WPF demos).

The change you have to make is to get the GridViewCell from the original source rather than the GridViewRow. You can then use the cell to update anything you want. 

As to the first part of your response, I am not sure I get what you are trying to achieve here. Can you provide a more detailed expanation? 

Thank you in advance! 

Regards,
Nik
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Tor
Top achievements
Rank 1
Answers by
Nick
Telerik team
Tor
Top achievements
Rank 1
Share this question
or