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

Categories Property only accepts strings and not objects

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? 

3 Replies

MK Muneesh Kumar G Syncfusion Team August 21, 2019 07:49 AM

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 

PF Patrick Fic August 21, 2019 10:38 AM

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? 

LR Lakshmi Radha Krishnan Syncfusion Team August 22, 2019 07:09 AM


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.


Live Chat Icon For mobile
Up arrow icon