Drop on GridViewRow

3 posts, 1 answers
  1. Dom
    Dom avatar
    18 posts
    Member since:
    May 2011

    Posted 13 Jun 2011 Link to this post

    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. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 14 Jun 2011 Link to this post

    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
  3. DevCraft banner
  4. Dom
    Dom avatar
    18 posts
    Member since:
    May 2011

    Posted 14 Jun 2011 Link to this post

    Excellent just what i was looking for thanks
Back to Top