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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to find out the current count of a column from the columnKey?

Thread ID:





130037 Apr 17,2017 11:53 PM UTC Apr 18,2017 05:19 PM UTC JavaScript 1
Tags: ejKanban
Eric Griffith
Asked On April 17, 2017 11:53 PM UTC

I would like to get the current count of cards displayed within a specific column key.  So imagine having a column with the column key "ABC".  I would like to do something like ejKanbanObj.columns.getCount(columnKey).


Rajesh Kumar Anburajan [Syncfusion]
Replied On April 18, 2017 05:19 PM UTC

Hi Eric Griffith, 

Thanks for contacting syncfusion support. 

The requested requirement of " How to find out the current count of a column from the columnKey" can be achieved through simple workaround solution. Here you can extend Kanban object to add  “getCount” method to achieve your requirement. 
Please refer to the following code snippets:  
create: function (args) { 
                                        var kbnObj = $('#Kanban').data('ejKanban'); 
                                        kbnObj.getCount = function (key) {  // Here you use the getcount method 
                                            data = new ej.DataManager(kbnObj.getCurrentJsonData()).executeLocal(new ej.Query().where(kbnObj.model.keyField, ej.FilterOperators.equal, key)); 
                                            return data.length; 
        function buttonClick(args) { 
            var kbnObj = $('#Kanban').data('ejKanban') 
            var count = kbnObj.getCount("Open"); 
            alert("Cards Count: " + count); 

Please check the bellow sample. 

Let us know if any queries.  

Rajesh Kumar.A 


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