drag with DraggedItemTemplate from gridview to scheduleview

3 posts, 0 answers
  1. guy
    guy avatar
    46 posts
    Member since:
    Sep 2010

    Posted 24 Sep 2012 Link to this post

    i want to display text with datasource values wile draging from gridview to scheduleview 

    im using this template 

                            <DataTemplate x:Key="DraggedItemTemplate">
                                    <StackPanel Orientation="Horizontal">                                   
                                        <TextBlock Text="{Binding CurrentDraggedItem.name}" FontWeight="Bold"/>
                                        <TextBlock Text="/>

    this is the event i use
     private void OnDragInitialize(object sender, DragInitializeEventArgs e)
                DropIndicationDetails details = new DropIndicationDetails();            
                var item = (sender as RadGridView).SelectedItem;
                details.CurrentDraggedItem = item;

                IDragPayload dragPayload = DragDropPayloadManager.GeneratePayload(null);

                dragPayload.SetData("DraggedData", item);
                dragPayload.SetData("DropDetails", details);

                e.Data = dragPayload;
                e.DragVisual = new Telerik.Windows.DragDrop.DragVisual()
                    Content = details,
                    ContentTemplate = territorymanagementactionitems.Resources["DraggedItemTemplate"] as DataTemplate
                e.DragVisualOffset = e.RelativeStartPoint;
                e.AllowedEffects = DragDropEffects.All;

    the problem is that the drop(on the scheduleview) is disabled 
    how can i enable it?
  2. Nick
    Nick avatar
    593 posts

    Posted 24 Sep 2012 Link to this post

    Hello Guy,

    Have you tried setting AllowDrop to true on the RadScheduleView?

    All the best,
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. DevCraft banner
  4. guy
    guy avatar
    46 posts
    Member since:
    Sep 2010

    Posted 25 Sep 2012 Link to this post

    yes , and with out the Template  it's working fine

Back to Top