We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Categories Property only accepts strings and not objects

Thread ID:





146803 Aug 20,2019 06:29 PM UTC Aug 22,2019 12:09 PM UTC WPF 3
Tags: SfKanban
Patrick Fic
Asked On August 20, 2019 06:29 PM UTC

I'm currently trying to do a customized implementation of the SfKanban control. I am generating the columns using a database, and then want to populate the cards using a foreign key relationship to the columns. See below. 

            Kanban = new SfKanban();
            Kanban.AutoGenerateColumns = false;
            Kanban.ColumnMappingPath = "AssignedSwimLane"; //This is on the card. Assigned swimlane is an integer mapping to the column which contains the column name and other details. 

            BoardColumns = Core.Helpers.SwimlaneHelper.GetAllSwimlanes();
            AllJobs = Core.Helpers.JobHelper.GetJobs();

            foreach (var s in BoardColumns)
                KanbanColumn openColumn = new KanbanColumn();
                openColumn.Title = s.SlName;
                openColumn.Categories = s.SlId; //SlId is an integer Assigned swimlane references this value. This cannot be used because Categories accepts only a string. 

According to the documentation, I should be able to set the categories using a list of objects: 
progressColumn.Categories = new List<object>() { "In Progress", "Validated" };
In the Xamarin Forms version of this project, I used the following successfully: 

            foreach( var s in Swimlanes)
                KanbanColumn openColumn = new KanbanColumn();
                openColumn.Title = s.SlName;
                openColumn.Categories = new System.Collections.Generic.List<object> { s.SlId };

This works for Xamarin, but not for WPF. Can I override the categories property to allow usage of an integer? 

Muneesh Kumar G [Syncfusion]
Replied On August 21, 2019 12:49 PM UTC

Hi Patrick, 
Greetings from Syncfusion.  
We have analyzed your requirement and we would like to inform you that in WPF SfKanban’s Categories property type is string. So, if you want to define the swimlane support in WPF, you have to initialize SwimlaneKey property in SfKanban. Please refer below user documentation for more details about this support.  
Please let us know if you have any other queries.  
Muneesh Kumar G 

Patrick Fic
Replied On August 21, 2019 03:38 PM UTC

Could you please elaborate on the inconsistency of the functionality of the product between platforms? Are there any plans to address both the outdated/incorrect documentation and the consistency? 

Lakshmi Radha Krishnan [Syncfusion]
Replied On August 22, 2019 12:09 PM UTC


Hi Patrick,


Due to the SfKanban lateral implementation in Xamarin.Forms. We have some behaviour inconsistency among the Xamarin and WPF platform.


WPF Implementation:


As we have mentioned earlier, you need to define the SwinlaneKey property if you expect to show more than one category in the same column as described in the below link. The categories which is defined in the same column will be always visible in the UI in WPF platform.




Xamarin Implementation:


You no need to define the SwinlaneKey explicitly if you expect to show more than one category in the same column. You can use the Categories property to show multiple category in one column. In Xamarin. The multiple categories which is defined in the same column will be visible in the UI only while card drag hovering.




Moreover, the documentation provided in both the platform (WPF and Xamarin) seems correct as per the implementation. Please let us know if you need further assistance on this.



Lakshmi R.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon