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

Column binding with enum

3 Answers 72 Views
TaskBoard
This is a migrated thread and some comments may be shown as answers.
Diego Modolo
Top achievements
Rank 1
Iron
Iron
Diego Modolo asked on 08 Dec 2020, 06:17 PM
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.

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 11 Dec 2020, 01:35 PM

Hello Diego,

Thank you for your interest in our RadTaskBoard control for WPF.

You could set the GroupMemberPath property of the RadTaskBoard to a property of enum type. You can create a custom class that derives from TaskBoardCardModel and expose enum property inside. Then you can set it to the GroupMemberPath property. The tasks will be placed in the respected columns by this property value.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products, quickly just got a fresh new look + new and improved content, including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Diego Modolo
Top achievements
Rank 1
Iron
Iron
answered on 11 Dec 2020, 06:45 PM

Hi Dinko, thank for the answer.

Using GroupMemberPath allowed me to use the enum, but I would like to know if there is a way to create the columns manually in XAML based on the enum. 

I needed that so I can give meaningful names to the columns, besides ordering them in a different way.

 

Thanks!

0
Dinko | Tech Support Engineer
Telerik team
answered on 16 Dec 2020, 09:38 AM

Hello Diego,

You could subscribe to the AutoGeneratingColumn event of the RadTaskBoard control. In the event handler, you can get the current generated column and modify its Header property per your needs.

private void tBoard_AutoGeneratingColumn(object sender, Telerik.Windows.Controls.TaskBoardAutoGeneratingColumnEventArgs e)
{
    e.Column.Header =e.Column.GroupName +" Desc";            
}

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TaskBoard
Asked by
Diego Modolo
Top achievements
Rank 1
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Diego Modolo
Top achievements
Rank 1
Iron
Iron
Share this question
or