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

Drop on GridViewRow

2 Answers 80 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dom
Top achievements
Rank 1
Dom asked on 13 Jun 2011, 09:01 PM
Hi,

I have 2 radgrids, first one withs items A. Second one with Items B and subitems of the same type as A.

I want to be able to drop items from first grid into the second one.

Right now I can drop items but only into the first row ( i can't find the right row)

private void OnDropInfo(object sender, DragDropEventArgs e)
{
    //GridViewRow
    RadGridView destination = sender as RadGridView;
    if (e.Options.Status == DragStatus.DropComplete)
    {
        (destination.ItemsSource as IList<Expedition>)[0].LstExpedition.Add(e.Options.Payload as LotExpedition);
    }
}
I tried enabling drop for each row

private void RadGridView3_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
            GridViewRow row = e.Row as GridViewRow;
            if (row != null)
            {
                row.IsExpandable = true;
                RadDragAndDropManager.SetAllowDrop(row,true);
            }
        }

And changing

RadGridView destination = sender as RadGridView; to GridViewRow instead, but by doing that, destination came out as null and it didn't work.

So anyway for me to find out which row I'm dropping my item in?

2 Answers, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 14 Jun 2011, 11:12 AM
Hi Domingos,

May you take a look at this forum thread and the sample project attached for a reference ? 
Let me know if you need further assistance.

Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Dom
Top achievements
Rank 1
answered on 14 Jun 2011, 03:29 PM
Excellent just what i was looking for thanks
Tags
DragAndDrop
Asked by
Dom
Top achievements
Rank 1
Answers by
Maya
Telerik team
Dom
Top achievements
Rank 1
Share this question
or