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

Dragging Collection of Items

2 Answers 40 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Wasif Jahangir
Top achievements
Rank 1
Wasif Jahangir asked on 08 Aug 2010, 01:59 PM
i m dragging a Collection from one grid to another and it is working fine. but i want to show the details of all selected Items in Cue (which are dragging right now) and secondly my dragging items contains itself the details lines too.
following is the Structure
Request -> RequestDetails

and my dragging Collection is ObservableCollection<Request>

and i want to show Content like this

Request-1
----RequestDetail-1
----RequestDetail-2
----RequestDetail-3
Request-2
----RequestDetail-1
----RequestDetail-2
----RequestDetail-3
Request-3
----RequestDetail-1
----RequestDetail-2
----RequestDetail-3

currently only first item is shown but not all.

2 Answers, 1 is accepted

Sort by
0
Wasif Jahangir
Top achievements
Rank 1
answered on 08 Aug 2010, 02:10 PM
<DataTemplate x:Key="ProcurementTemplate">
           <Border BorderThickness="1" Background="#4CC7D9ED">
               <StackPanel Orientation="Vertical">
                   <TextBlock Text="{Binding Path=Name}"></TextBlock>
                   <ListBox ItemsSource="{Binding Path=ProcurementRequestDetails}" Background="Transparent" >
                       <ListBox.ItemTemplate>
                           <DataTemplate>
                               <StackPanel Orientation="Horizontal">
                                   <TextBlock FontSize="12" FontWeight="Bold" FontFamily="Tahoma" Text="{Binding  Path=Product.Name}"/>
                                   <TextBlock Margin="5,0,0,0"  FontFamily="Tahoma" Text="{Binding  Path=UnitDescriptor.Name}"/>
                                   <TextBlock Margin="5,0,0,0" FontFamily="Tahoma" Text="{Binding  Path=Quantity}"/>
                               </StackPanel>
                           </DataTemplate>
                       </ListBox.ItemTemplate>
                   </ListBox>
               </StackPanel>
           </Border>
       </DataTemplate>
above template showing me first record only. which seems Cue.Content property only accept one Object
whereas Following DataTemplate Showing Nothing:
<DataTemplate x:Key="ProcurementTemplate">
            <Border BorderThickness="1" Background="#4CC7D9ED">
                <StackPanel Orientation="Vertical">
                    <ListBox  Background="Transparent" >
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Vertical"  >
                                    <TextBlock FontSize="12" FontWeight="Bold" FontFamily="Tahoma" Text="{Binding  Path=Product.Name}"/>
                                    <ListBox ItemsSource="{Binding Path=ProcurementRequestDetails}" Background="Transparent" >
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal">
                                                    <TextBlock FontSize="12" FontWeight="Bold" FontFamily="Tahoma" Text="{Binding  Path=Product.Name}"/>
                                                    <TextBlock Margin="5,0,0,0"  FontFamily="Tahoma" Text="{Binding  Path=UnitDescriptor.Name}"/>
                                                    <TextBlock Margin="5,0,0,0" FontFamily="Tahoma" Text="{Binding  Path=Quantity}"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                     
                </StackPanel>
            </Border>
        </DataTemplate>
0
Tsvyatko
Telerik team
answered on 12 Aug 2010, 12:48 PM
Hello Wasif Jahangir,

I have created sample application that enables the requested scenario using RadGridView in the DragCue. Please have a look at it and let me know if this works for you

Kind regards,
Tsvyatko
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
Tags
DragAndDrop
Asked by
Wasif Jahangir
Top achievements
Rank 1
Answers by
Wasif Jahangir
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or