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

Knockout Support

Hi there,

Is there any knockout3 support for your javascript controls?

I find that the knockout 2 implementations are extremely old, no other control sets I use, devextreme etc use knockout 2?

If this is the case are there any third party devs working on ko3 binders to your javascript controls?

Regards
Jason

12 Replies

SI Silambarasan I Syncfusion Team March 29, 2017 12:42 PM UTC

Hi Jason, 
 
Thank you for using Syncfusion products. 
 
We have checked your query and we would like to let you know that, our Syncfusion JavaScript components are supported and compatible with Knockout 3.0 version. 
 
Regards, 
Silambarasan 



JA Jason March 29, 2017 06:46 PM UTC

The version of Knockout that comes with syncfusion, i.e. in the ..\assets\external\knockout.min.js file is version 2 of knockout.If I use knockout 3.4.2 for the kanban board in my view like so......       ...and in the viewmodel like so...        self.columns = ko.observable([]);        self.ejKanban_options = {            columns: ko.pureComputed(function () {                        return self.columns()                    }),        };self.init = function(data){         var a = [];            $.each(data.Board.Columns, function (i, column) {                a.push({ headerText: column.Name, key: column.BoardColumnId });            });            self.columns(a);}I get error.... Failed to execute 'replaceChild' on Node: parameter 2 is not of type 'Node'So what is wrong with this very basic method of creating custom columns using an observable.


SK Shanmugaraja K Syncfusion Team March 30, 2017 12:36 PM UTC

Hi Jason,  
 
We have checked your query. The issue was not reproduced with knockout 3.4.2 version in our end. Please check the below sample.   
 
 
If still reproduce the same issue in the above sample, please get back to us with more information. So that we can work on this and provide you a better solution quickly. 
 
Regards,    
Shanmugaraja K 



JA Jason March 30, 2017 07:28 PM UTC

OK if the columns observablearray is empty i.e. columns = observableArray([]); then you set the array with the columns needed I get the replaceChild error.

I can workaround this at my end I think, but I wonder if this is still a bug?

The idea is that the form is empty, i.e. has no columns, until data has been loaded via ajax with the board configuration


JA Jason March 31, 2017 12:14 AM UTC

There seems to be some issue with using knockout with the data and columns.....

I have an object in my viewmodel...

self.ejKanban_options = {
            dataSource: self.tasks,
            columns: self.columns,
            fields: {
                content: "Subject",
                primaryKey: "TaskId"
            },
            keyField: "BoardColumnId"
        };

and I add columns and tasks using an Ajax.Get...

function fillBoard (board){
            var a = [];

            var kb = $('.kanbanboard').data('ejKanban');
            
            //Set the columns observable array
            $.each(board.Board.Columns, function (i, column) {
                a.push({ headerText: column.Name, key: column.BoardColumnId });
            });
            self.columns(a);

            //Set the Task Data
            var kb = $('.kanbanboard').data('ejKanban');
            var dataManager = new ej.DataManager(board.Tasks);

            self.tasks(dataManager);
}

Now this will in fact show the columns as it should, however the tasks are not showing up in the columns, but they are in the internal array of the ejKanban board.

Now after much testing, I find that if I set the columns observable with some data first

        self.columns = ko.observableArray([{ headerText: "test", key: "45064E8E-6F88-459D-BA74-B8721F1E15C8" }, { headerText: 'Planned', key: 'EBED51D0-FA68-49C6-830D-EE72B30E7BA0' }]);

the task data is populated into the two columns I have pre added to the board before my ajax event, these two columns are in fact removed and new columns are added, but the two columns with the keys that were set in the initialization of the kanban control work, however the other columns with new keys do not work. As its if there is an internal array of ids being used to filter the tasks that isn't being refreshed when the columns are updated? 




I could not get the 


JA Jason March 31, 2017 12:31 AM UTC

It appears after looking at the kanban object through console, that two objects are not being updated, one is keyPredicates, if I remove an object from the initial columns object this relects what is in the initial columns object.

Also the _cloneQuery.queries[1] object has the same predicate objects in it.


JA Jason March 31, 2017 01:57 AM UTC

if I do this....

this will remove the queries (Predicates)

            kb.model.query.queries = [];


this doesn't do anything, I was hoping it would help
            kb.refresh();

but if I then move a card from one of the columns I hacked to get visible using the methods mentioned earlier, i.e. set the init of the columns to a column with an actual key needed all the cards appear.

Now clearly this is a hack and should be needed?




RK Rajesh Kumar Anburajan Syncfusion Team March 31, 2017 05:45 PM UTC

Hi Jason,  

We have analyses your reported query “Knockout Support”. It’s some defaulty for finding some items. We will update you on (3/4/2017). 

Regards, 

Rajesh kumar.A 



JA Jason April 3, 2017 08:00 PM UTC

 I can't log into the direct trac incident report, it isn't visible under my profile.



BS Buvana Sathasivam Syncfusion Team April 4, 2017 04:38 AM UTC

Hi Jason,   
  
Thanks for your update.   
  
We are sorry to inform that new incident was not created for this forum.  The reported issue will be fixed in the upcoming Volume 2 SP 1, 2017 release which is expected to be roll out by the month of May, 2017.   
  
Regards,   
Buvana S.   
 



JA Jason April 4, 2017 05:04 AM UTC

This is pretty bad, I have tried two controls so far, sfListView and sfKanban, both in a Xamarin app and in javascript and I am getting problems that are blocking both of my dev paths, and each one is taking well over two months to fix, until then I am stuck and can't go any further with your controls, very frustrating?!


RK Rajesh Kumar Anburajan Syncfusion Team April 5, 2017 05:19 PM UTC

Hi Jason,   
Direct trac incident is created in your account for the reported query in this forum. Please log on to our support website to check for further updates.    
Regards,   
Rajesh Kumar.A  
 


Loader.
Up arrow icon