Dragging Collection of Items

3 posts, 0 answers
  1. Wasif Jahangir
    Wasif Jahangir avatar
    35 posts
    Member since:
    May 2010

    Posted 08 Aug 2010 Link to this post

    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. Wasif Jahangir
    Wasif Jahangir avatar
    35 posts
    Member since:
    May 2010

    Posted 08 Aug 2010 Link to this post

    <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>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 12 Aug 2010 Link to this post

    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
Back to Top