Telerik Forums
UI for WPF Forum
2 answers
48 views

Hello,

My Radtaskboard contains dozens of items. How do I find an item and scroll to it so the user can find it?
I have made this code:


 foreach (taskboarddata item in MyRadTaskBoard.Items)
 {
     if (item.Id == itemidsearch)
     {
         this.MyRadTaskBoard.SelectedItem = item;


but only selection, the UI does not direct/point to the item.

Thank you for your help.

The Nimble Coder
Top achievements
Rank 2
Iron
 answered on 27 Feb 2024
1 answer
59 views
Hi, 
Using Telerik.UI.for.Wpf.NetCore.Xaml  (2022.3.912).
I'm getting an error for the taskboard the first time it loads
Both 'ContentTemplate' and 'ContentTemplateSelector' are set;  'ContentTemplateSelector' will be ignored. RadTaskBoardItem:'RadTaskBoardItem' (Name='')
this error as many as the Item task that appears.

Then when I exit and return to the taskboar page, another error appears:
Cannot find source: RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadTaskBoard', AncestorLevel='1'

        <telerik:RadTaskBoard x:Name="RadTaskBoard01"  Grid.Row="3" 
                              ItemsSource="{Binding TaskboardCollView}" 
                              GroupMemberPath="State"
                              Background="{StaticResource StripeColor}" 
                              AutoGenerateColumns="False">
            <telerik:RadTaskBoard.DragDropBehavior>
                <localservice:CustomTaskBoardDragDropBehavior/>
            </telerik:RadTaskBoard.DragDropBehavior>
            <telerik:RadTaskBoard.Columns>
                <telerik:TaskBoardColumn GroupName="NEW" Header="Red"  />
                <telerik:TaskBoardColumn GroupName="INPROGRESS" Header="Yellow" />
                <telerik:TaskBoardColumn GroupName="REVIEWED" Header="Gray" />
                <telerik:TaskBoardColumn GroupName="DONE" Header="ForestGreen" />
            </telerik:RadTaskBoard.Columns>
            <telerik:RadTaskBoard.ColumnHeaderTemplate >
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions >
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Border  Width="17" Grid.Column="0" Background ="{Binding Header}"  BorderThickness="1" BorderBrush="Black" CornerRadius="10" ></Border>
                        <TextBlock Grid.Column="1" Text="{Binding GroupName}"  HorizontalAlignment="Left"  />
                        <TextBlock Grid.Column="2" Margin="10 ,0 ,10, 0" Text="{Binding Items.Count}" HorizontalAlignment="Right" />
                    </Grid>
                </DataTemplate>
            </telerik:RadTaskBoard.ColumnHeaderTemplate>
            <telerik:RadTaskBoard.ItemTemplate>
                <DataTemplate>
                    <Grid >
                        <Grid.ColumnDefinitions >
                            <ColumnDefinition Width="5"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions >
                            <RowDefinition/>
                            <RowDefinition Height="25"/>
                        </Grid.RowDefinitions>
                        <Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column ="0" 
                              Background="{Binding CategoryName, Converter={StaticResource CategoryToColour}}">
                        </Grid>
                        <StackPanel  Grid.Row="0"  Grid.Column ="1" >
                            <TextBlock Text="{Binding Parenttitle}"  Margin="15,0,5,0"   Foreground="{StaticResource StripeColor}"  FontSize="16" TextWrapping="Wrap"  />
                            <StackPanel Visibility="{Binding Isparent, Converter={StaticResource BoolToVisible}}">
                                <TextBlock Text="Have Sub Task"
                                           HorizontalAlignment="Right"
                                           Margin="0,0,5,0"
                                           Foreground="Red"
                                           FontWeight="Bold"
                                           FontStyle ="Italic" 
                                           FontSize="12" />
                            </StackPanel>
                            <StackPanel Visibility="{Binding Title, Converter={StaticResource EmptyToVisible }}">
                                <TextBlock Text="{Binding Title}"
                                           Margin="15,0,5,0"
                                           Foreground="Brown"
                                           TextWrapping="WrapWithOverflow"
                                           FontSize="14" />
                            </StackPanel>
                            <TextBlock Text="{Binding Description}"
                                       Margin="15,0,5,0"
                                       TextWrapping="Wrap"
                                       FontSize="14" />
                        </StackPanel>

                        <TextBlock Text="{Binding Assignee}"  Grid.Row="1"   Grid.Column ="1" Margin="15,0,15,0" Foreground="ForestGreen"      
                                   FontSize="16" FontStyle="Italic"  HorizontalAlignment="Right" VerticalAlignment="Bottom" />
                    </Grid>
                </DataTemplate>
            </telerik:RadTaskBoard.ItemTemplate>
        </telerik:RadTaskBoard>

Stenly
Telerik team
 answered on 13 Dec 2022
1 answer
126 views

Hi

I'm trying to style the column header background colour of the RadTaskBoard.

Using the RadTaskBoard.ColumnHeaderTemplate you can change the content of the column header as in the image below, but you can't style the background.

I need each column header (and collapsed header) to have its own colour. Is there a way I can achieve this?

Thanks

Guy

Dilyan Traykov
Telerik team
 answered on 31 Aug 2021
3 answers
71 views
I would like to know if there is a way to bind the columns to a enum value, and when I drag/drop the tiles between the columns, the correct enum assigned to that column is attributed to the object.
Dinko | Tech Support Engineer
Telerik team
 answered on 16 Dec 2020
4 answers
183 views

After trying the First Look exemple code, there is something I did not find.

If we want to store the control content to a database or any data storage, we can look at the DataContext.Data to get back all the cards.
State property is well corresponding to the new column for exemple.

But how to know in which orders they are now sorted. There is no "Order" / "Index" / "Position" property we can bind ?

Without this info it is difficult to redraw later the same board in the same state.

Is there a way to get this information

 

Thanks

Patrick
Top achievements
Rank 1
 answered on 09 Nov 2020
4 answers
126 views

I have 4 columns: "Not Started", "In Progress", "Completed", and "Notes". You will notice there is big gap at the end in the picture(the right side).

Full Board

 

If I were to drag an item into that left over gap, the Task vanishes from the Board. I have verified that the Task does still exist. Also the Task's "State" remains in the last State is was in.

TaskDropInEmpty

AfterDrop

ProofTaskStillExist

One solution you might suggest is to make the columns bigger, well I need to be able to show blank space in order to allow more columns to be created by the user. Showing the empty space helps the user.

I've also tried seeing if I cancel the "CanDrop" behaviour, but it does not trigger due to it thinking its still in the existing State. Here is a log of what happens when I move the Task from "Notes" to empty space.

CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
CanDrop: TargetedColumn:Notes
IsMovingItems: TargetedColumn:Notes
DragDropCompleted: TargetedColumn:
IsMovingItems: TargetedColumn:

 

Here is the DropBehaviourClass

public class TaskDragBehavior : TaskBoardColumnDragDropBehavior
    {
 
        public TaskDragBehavior()
            : base()
        {
 
        }
 
        public override bool CanDrop(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            Debug.Print($"CanDrop: TargetedColumn:{dds?.TargetColumn?.GroupName}");
            return base.CanDrop(state);
        }
 
        public override bool CanStartDrag(DragDropState state)
        {
            return base.CanStartDrag(state);
        }
 
        protected override IEnumerable<object> CopyDraggedItems(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            Debug.Print($"CopyDraggedItems: TargetedColumn:{dds?.TargetColumn?.GroupName}");
            return base.CopyDraggedItems(state);
        }
 
        public override void DragDropCanceled(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            base.DragDropCanceled(state);
        }
 
        public override void DragDropCompleted(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            Debug.Print($"DragDropCompleted: TargetedColumn:{dds?.TargetColumn?.GroupName}");
            base.DragDropCompleted(state);
        }
 
        public override void Drop(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            Debug.Print($"Drop: TargetedColumn:{dds?.TargetColumn?.GroupName}");
            base.Drop(state);
        }
 
        protected override bool IsMovingItems(DragDropState state)
        {
            var dds = state as TaskBoardColumnDragDropState;
            Debug.Print($"IsMovingItems: TargetedColumn:{dds?.TargetColumn?.GroupName}");
            return base.IsMovingItems(state);
        }
    }

 

And if you really want the WPF for reference, here it is as well.

001.<Grid>
002.        <Grid Name="IsVisibleSearch">
003.            <Grid.RowDefinitions>
004.                <RowDefinition Height="Auto" />
005.                <RowDefinition Height="*" />
006.            </Grid.RowDefinitions>
007.            <!--Main ToolBar-->
008.            <telerik:RadToolBarTray Name="MainToolTray" Grid.Row="0">
009.                <telerik:RadToolBar OverflowButtonVisibility="Collapsed">
010.                    <telerik:RadButton cal:Message.Attach="LaunchNew"
011.                                       ToolTip="New Tag Item">
012.                        <Image Source="../../Icons/plus_24_24.png" Width="24" />
013.                    </telerik:RadButton>
014.                    <telerik:RadButton cal:Message.Attach="LaunchEdit"
015.                                       ToolTip="Edit Tag Item">
016.                        <Image Source="../../Icons/edit_24_24.png" Width="24" />
017.                    </telerik:RadButton>
018.                </telerik:RadToolBar>
019.            </telerik:RadToolBarTray>
020.             
021.            <!--Tab Controller-->
022.            <telerik:RadTabControl Grid.Row="1">
023. 
024.                <!--Board Tab-->
025.                <telerik:RadTabItem Header="Board">
026.                    <telerik:RadTaskBoard x:Name="taskBoard" ItemHeight="180"
027.                                          ItemsSource="{Binding PlannerTasks}"
028.                                          GroupMemberPath="SalesOrderState" Grid.Row="1"
029.                                          AutoGenerateColumns="False" ColumnOffset="20"
030.                                          ColumnWidth="400">
031.                        <telerik:RadTaskBoard.DragDropBehavior>
032.                            <local1:TaskDragBehavior/>
033.                        </telerik:RadTaskBoard.DragDropBehavior>
034.                        <telerik:RadTaskBoard.ItemTemplate>
035.                            <DataTemplate>
036.                                <Grid>
037.                                    <Grid.ColumnDefinitions>
038.                                        <ColumnDefinition Width="Auto" />
039.                                        <ColumnDefinition Width="*" />
040.                                        <ColumnDefinition Width="*" />
041.                                        <ColumnDefinition Width="*" />
042.                                        <ColumnDefinition Width="*" />
043.                                        <ColumnDefinition Width="Auto" />
044.                                    </Grid.ColumnDefinitions>
045.                                    <Grid.RowDefinitions>
046.                                        <RowDefinition Height="Auto" />
047.                                        <RowDefinition Height="*" />
048.                                        <RowDefinition Height="*" />
049.                                        <RowDefinition Height="*" />
050.                                        <RowDefinition Height="*" />
051.                                        <RowDefinition Height="*" />
052.                                        <RowDefinition Height="*" />
053.                                        <RowDefinition Height="*" />
054.                                    </Grid.RowDefinitions>
055. 
056.                                    <!--Category-->
057.                                    <Border Margin="0 0" Grid.Column="0" Grid.Row="0"
058.                                             Grid.RowSpan="8" Padding="3" Background="Orange" CornerRadius="2"/>
059. 
060.                                    <!--Due Date-->
061.                                    <TextBlock Grid.Column="2" Grid.ColumnSpan="3" Grid.Row="0"
062.                                               Margin="5" FontSize="12" FontWeight="DemiBold"
063.                                               HorizontalAlignment="Right">
064.                                        <Run>Due: </Run>
065.                                        <Run Text="{Binding DueDate}" />
066.                                    </TextBlock>
067. 
068.                                    <!--Title-->
069.                                    <TextBlock Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="1"
070.                                               Grid.RowSpan="2"
071.                                               Margin="5" FontSize="16" FontWeight="Bold"
072.                                               TextWrapping="Wrap"
073.                                               Text="{Binding Title}" />
074. 
075. 
076.                                    <!--Tags-->
077.                                    <ListBox ItemsSource="{Binding Path=Tags3}"
078.                                             ScrollViewer.HorizontalScrollBarVisibility="Disabled"
079.                                             ScrollViewer.VerticalScrollBarVisibility="Disabled"
080.                                             Grid.Column="1" Grid.ColumnSpan="3"
081.                                             Background="Transparent" BorderBrush="Transparent"
082.                                             Grid.Row="4" Grid.RowSpan="3">
083.                                        <ListBox.ItemsPanel>
084.                                            <ItemsPanelTemplate>
085.                                                <WrapPanel Orientation="Horizontal"
086.                                                           IsItemsHost="True" IsEnabled="False" />
087.                                            </ItemsPanelTemplate>
088.                                        </ListBox.ItemsPanel>
089.                                        <ListBox.ItemTemplate>
090.                                            <DataTemplate>
091.                                                <Border Padding="4" Background="{Binding Color}"
092.                                                        CornerRadius="10">
093.                                                    <TextBlock FontSize="12"
094.                                                               Text="{Binding TagName}"
095.                                                               Foreground="Black" FontWeight="Bold" />
096.                                                </Border>
097.                                            </DataTemplate>
098.                                        </ListBox.ItemTemplate>
099.                                    </ListBox>
100. 
101. 
102.                                    <!--Profile Pic-->
103.                                    <Ellipse Height="40" Width="40" Grid.Column="4"
104.                                             Grid.ColumnSpan="2" Grid.Row="1" Grid.RowSpan="4"
105.                                             Stroke="Black">
106.                                        <Ellipse.Fill>
107.                                            <ImageBrush ImageSource="../../Icons/DRP_icon.png"
108.                                                        Stretch="UniformToFill" />
109.                                        </Ellipse.Fill>
110.                                    </Ellipse>
111. 
112.                                    <!--Dependents and Est Hours-->
113.                                    <TextBlock Grid.Column="2" Grid.ColumnSpan="4" Grid.Row="7"
114.                                               Margin="0 0 5 5"
115.                                               FontSize="12" HorizontalAlignment="Right"
116.                                               VerticalAlignment="Bottom">
117.                                        <Run TextDecorations="Underline">Dependents: </Run>
118.                                        <Run FontWeight="Bold">10</Run>
119.                                        <Run Text="   " />
120.                                        <Run TextDecorations="Underline">Est Hours: </Run>
121.                                        <Run FontWeight="Bold" Text="{Binding EstimatedHours}" />
122.                                    </TextBlock>
123.                                </Grid>
124.                            </DataTemplate>
125.                        </telerik:RadTaskBoard.ItemTemplate>
126.                    </telerik:RadTaskBoard>
127.                </telerik:RadTabItem>
128. 
129.                <!--Grid Tab-->
130.                <telerik:RadTabItem Header="Grid">
131.                    <StackPanel Orientation="Vertical">
132.                        <!--GRID LAYOUT BUTTONS-->
133.                        <telerik:RadToolBarTray Name="GridToolTray">
134.                            <telerik:RadToolBar OverflowButtonVisibility="Collapsed">
135.                                <telerik:RadDropDownButton Name="Grid_ExportTo"
136.                                                           ToolTip="Export Grid To">
137.                                    <telerik:RadDropDownButton.Content>
138.                                        <Image Source="../../Icons/export_24_24.png" Width="24" />
139.                                    </telerik:RadDropDownButton.Content>
140.                                    <telerik:RadDropDownButton.DropDownContent>
141.                                        <telerik:RadContextMenu>
142.                                            <telerik:RadMenuItem Name="ExportGridToExcel"
143.                                                                 Header="Excel" />
144.                                            <telerik:RadMenuItem Name="ExportGridToPDF" Header="PDF" />
145.                                        </telerik:RadContextMenu>
146.                                    </telerik:RadDropDownButton.DropDownContent>
147.                                </telerik:RadDropDownButton>
148.                            </telerik:RadToolBar>
149.                            <telerik:RadToolBar>
150.                                <TextBlock>Grid Layout:</TextBlock>
151.                                <telerik:RadComboBox Name="GridLayoutList"
152.                                                     ItemsSource="{Binding GridLayouts}"
153.                                                     SelectedItem="{Binding Path=SelectedGridLayout, Mode=TwoWay}"
154.                                                     Width="150" />
155.                                <telerik:RadButton cal:Message.Attach="LoadSelectedGridLayout"
156.                                                   ToolTip="Load Grid Layout">
157.                                    <Image Source="../../Icons/import_24_24.png" Width="24" />
158.                                </telerik:RadButton>
159.                                <telerik:RadButton cal:Message.Attach="SaveSelectedGridLayout"
160.                                                   ToolTip="Save Grid Layout">
161.                                    <Image Source="../../Icons/save_24_24.png" Width="24" />
162.                                </telerik:RadButton>
163.                                <telerik:RadButton cal:Message.Attach="SetSelectedGridLayoutAsFavorite"
164.                                                   ToolTip="Save Grid Layout As Favorite">
165.                                    <Image Source="../../Icons/star_24_24.png" Width="24" />
166.                                </telerik:RadButton>
167.                                <telerik:RadButton cal:Message.Attach="NewGridLayout"
168.                                                   ToolTip="New Grid Layout">
169.                                    <Image Source="../../Icons/plusV2_24_24.png" Width="24" />
170.                                </telerik:RadButton>
171.                                <telerik:RadButton cal:Message.Attach="DeleteGridLayout"
172.                                                   ToolTip="Delete Grid Layout">
173.                                    <Image Source="../../Icons/deleteV2_24_24.png" Width="24" />
174.                                </telerik:RadButton>
175.                            </telerik:RadToolBar>
176.                        </telerik:RadToolBarTray>
177. 
178.                        <!--GRID-->
179.                        <telerik:RadGridView IsBusy="{Binding IsBusy}" Name="GridResults"
180.                                             IsReadOnly="True" CanUserSearch="True"
181.                                             ShowSearchPanel="True"
182.                                             SearchPanelCloseButtonVisibility="Collapsed"
183.                                             AutoGenerateColumns="False"
184.                                             ItemsSource="{Binding Path=PlannerTasks, Mode=TwoWay}"
185.                                             SelectedItem="{Binding Path=SelectedPlannerTask, Mode=TwoWay}">
186.                            <telerik:RadGridView.Columns>
187.                                <telerik:GridViewDataColumn Header="ID"
188.                                                            DataMemberBinding="{Binding PlannerTask_ID}"
189.                                                            Width="Auto" IsVisible="False" />
190.                                <telerik:GridViewDataColumn Header="Title"
191.                                                            DataMemberBinding="{Binding Title}"
192.                                                            Width="Auto" />
193.                                <telerik:GridViewDataColumn Header="State"
194.                                                            DataMemberBinding="{Binding SalesOrderState}"
195.                                                            Width="Auto" />
196.                                <telerik:GridViewDataColumn Header="Category"
197.                                                            DataMemberBinding="{Binding Category}"
198.                                                            Width="Auto" />
199.                                <telerik:GridViewDataColumn Header="IsArchived"
200.                                                            DataMemberBinding="{Binding SalesOrderIsArchived}"
201.                                                            Width="Auto" IsVisible="False" />
202.                                <telerik:GridViewDataColumn Header="Position"
203.                                                            DataMemberBinding="{Binding SalesOrderPosition}"
204.                                                            Width="Auto" IsVisible="False" />
205.                                <telerik:GridViewDataColumn Header="Priority"
206.                                                            DataMemberBinding="{Binding PriorityLevel}"
207.                                                            Width="Auto" />
208.                                <telerik:GridViewDataColumn Header="Tags"
209.                                                            DataMemberBinding="{Binding Tags}"
210.                                                            Width="Auto" />
211.                                <telerik:GridViewDataColumn Header="EstimatedHours"
212.                                                            DataMemberBinding="{Binding EstimatedHours}"
213.                                                            Width="Auto" />
214.                                <telerik:GridViewDataColumn Header="StartDate"
215.                                                            DataMemberBinding="{Binding StartDate}"
216.                                                            Width="Auto" />
217.                                <telerik:GridViewDataColumn Header="DueDate"
218.                                                            DataMemberBinding="{Binding DueDate}"
219.                                                            Width="Auto" />
220.                                <telerik:GridViewDataColumn Header="CompletedDate"
221.                                                            DataMemberBinding="{Binding CompletedDate}"
222.                                                            Width="Auto" />
223.                                <telerik:GridViewDataColumn Header="ArchivedDate"
224.                                                            DataMemberBinding="{Binding ArchivedDate}"
225.                                                            Width="Auto" IsVisible="False" />
226.                                <telerik:GridViewDataColumn Header="Last Modified By"
227.                                                            DataMemberBinding="{Binding ModifiedBy_Username}"
228.                                                            Width="Auto" />
229.                                <telerik:GridViewDataColumn Header="Created By"
230.                                                            DataMemberBinding="{Binding CreatedBy_Username}"
231.                                                            Width="Auto" IsVisible="False" />
232.                                <telerik:GridViewDataColumn Header="Archived By"
233.                                                            DataMemberBinding="{Binding ArchiveBy_Username}"
234.                                                            Width="Auto" IsVisible="False" />
235.                                <telerik:GridViewDataColumn Header="Sales Order ID"
236.                                                            DataMemberBinding="{Binding SalesOrder_ID}"
237.                                                            Width="Auto" IsVisible="False" />
238.                            </telerik:RadGridView.Columns>
239.                            <telerik:RadGridView.ControlPanelItems>
240.                                <telerik:ControlPanelItem ButtonTooltip="Column chooser">
241.                                    <telerik:ControlPanelItem.Content>
242.                                        <ListBox ItemsSource="{Binding Columns}" BorderThickness="0">
243.                                            <ListBox.ItemTemplate>
244.                                                <DataTemplate>
245.                                                    <CheckBox Content="{Binding Header, Mode=OneWay}"
246.                                                              IsChecked="{Binding IsVisible, Mode=TwoWay}" />
247.                                                </DataTemplate>
248.                                            </ListBox.ItemTemplate>
249.                                        </ListBox>
250.                                    </telerik:ControlPanelItem.Content>
251.                                </telerik:ControlPanelItem>
252.                            </telerik:RadGridView.ControlPanelItems>
253.                        </telerik:RadGridView>
254.                    </StackPanel>
255.                </telerik:RadTabItem>
256.            </telerik:RadTabControl>
257.        </Grid>
258.        <ContentControl Name="ActiveItem">
259.            <ContentControl.Style>
260.                <Style TargetType="{x:Type ContentControl}">
261.                    <Style.Triggers>
262.                        <DataTrigger Binding="{Binding Path=IsVisibleScreen, Mode=TwoWay}"
263.                                     Value="False">
264.                            <Setter Property="Visibility"
265.                                    Value="Hidden" />
266.                        </DataTrigger>
267.                        <DataTrigger Binding="{Binding Path=IsVisibleScreen, Mode=TwoWay}"
268.                                     Value="True">
269.                            <Setter Property="Visibility"
270.                                    Value="Visible" />
271.                        </DataTrigger>
272.                    </Style.Triggers>
273.                </Style>
274.            </ContentControl.Style>
275.        </ContentControl>
276.    </Grid>
Derek
Top achievements
Rank 1
 answered on 01 Jul 2020
2 answers
81 views

Hi,

Would it be possible to add a 'Compact' view of the Cards where the Description is collapsed? 

Example attached.

Thanks,

Richard

Richard
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 24 Jun 2020
2 answers
175 views

I'm trying to implement the custom Drag Drop behavior depicted at this link: https://docs.telerik.com/devtools/wpf/controls/radtaskboard/features/taskboardcolumndragdropbehavior#taskboardcolumndragdropbehavior

 However I cannot get the XAML to recognize this item 

<telerik:RadTaskBoard.DragDropBehavior>

 

The error message is 'The member "DragDropBehavior" is not recognized or is not accessible.

Regards,

Brian
Top achievements
Rank 1
Veteran
 answered on 24 Apr 2020
2 answers
98 views

Hi,

I'm working on an application that uses the TaskBoard and have encountered an issue when updating the State property of the TaskBoardCardModel. When the State is updated via binding should the card not move to the appropriate column?

To reproduce the issue I've provided the XAML and view model code for your review.

<Window
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:local="clr-namespace:TaskBoardIssue" x:Class="TaskBoardIssue.MainWindow"
                Title="MainWindow" Height="350" Width="525"
                WindowState="Maximized"
    >
    <Window.DataContext>
        <local:TaskBoardVM/>
    </Window.DataContext>
    <Grid>
 
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
 
        <StackPanel Grid.Column="1"
                    Orientation="Vertical">
 
            <Button Content="Add New Model"
                    Margin="3"
                    Command="{Binding AddModel}"
                    />
 
            <Button Content="Update State"
                    Margin="3"
                    Command="{Binding UpdateModel}"
                    />
             
            <telerik:RadPropertyGrid
                Item="{Binding TestModel}"
                />
 
        </StackPanel>
 
        <telerik:RadTaskBoard
            ItemsSource="{Binding MyTasks}"
            GroupMemberPath="State"
            AutoGenerateColumns="True"
            />
 
    </Grid>
</Window>

 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.TaskBoard;
 
namespace TaskBoardIssue
{
    public class TaskBoardVM : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
 
 
        ObservableCollection<TaskBoardCardModel> myTasks;
 
        public ObservableCollection<TaskBoardCardModel> MyTasks { get; set; }
 
 
        private TaskBoardCardModel testModel;
 
        public TaskBoardCardModel TestModel
        {
            get { return testModel; }
            set
            {
                if (testModel != null)
                    if (testModel.Equals(value))
                        return;
 
                testModel = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TestModel)));
            }
        }
 
 
        public TaskBoardVM()
        {
            TestModel = new TaskBoardCardModel() { Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Backlog"};
 
            MyTasks = new ObservableCollection<TaskBoardCardModel>()
            {
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Backlog"},
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Active"},
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Complete"},
            };
 
            AddModel = new DelegateCommand(InsertTestModel, canBeExecuted);
            UpdateModel = new DelegateCommand(UpdateTestModel, canBeExecuted);
            this.CanExecuteCommand = true;
        }
 
 
        public bool CanExecuteCommand { get; set; }
        public ICommand AddModel { get; set; }
        public ICommand UpdateModel { get; set; }
 
 
        private bool canBeExecuted(object obj)
        {
            return this.CanExecuteCommand;
        }
 
        private void InsertTestModel(object obj)
        {
            MyTasks.Add(TestModel);
            this.PropertyChanged(this, new PropertyChangedEventArgs(nameof(MyTasks)));
        }
 
        private void UpdateTestModel(object arg)
        {
            TestModel.State = "Active";
        }
 
    }
}

 

If you build and run the application, click the 'Add New Model' and you can see the model being added to the appropriate column. However when you click 'Update Model' you can see the State property does update (see Property Grid), but the Task Card does not move to the correct column.

Regards,

 

Brian
Top achievements
Rank 1
Veteran
 answered on 24 Apr 2020
1 answer
60 views

Hi,

is there a way to add multiple assignees ?

Thanks,

Yair

Dinko | Tech Support Engineer
Telerik team
 answered on 20 Apr 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?