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

KendoUI datasource bound with Html table (not grid)

3 Answers 69 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Sameer
Top achievements
Rank 1
Sameer asked on 03 Jan 2014, 10:17 PM
I am using KendoUI web controls with KO binding using knockout-kendo.js in my project. It works like a charm with kendo Grid. 

However, at couple of places I want to use Html table whose rows are bound with kendo datasource inside my VM using KO bindings. In other words, I want something similar to ko's foreach binding using kendo datasource. 

I referred http://jsfiddle.net/rniemeyer/qtx3J/ as a sample but when I integrate kendo datasource here, it stops working.

var viewModel = ko.observable({
                persons: new kendo.data.DataSource({
                    schema: {
                        model: { id: "PersonId" },
                        data: "Data",
                        total: "Total",
                    },
                    transport: {
                        read: {
                            url: "/api/PersonApi/Get",
                            dataType: "json", 
                        },
                                            },
                    pageSize: 2,
                    serverPaging: true,
                    serverSorting: true,
                }),
                itemTemplate : function (item) { return "view"; },});

Thank you for your help!

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 06 Jan 2014, 08:41 AM
Hello Sameer,

The Knockout-Kendo library is part of the Kendo UI Labs projects. As such, these projects are not officially supported by the Kendo UI team. Any support requests (via tickets or Forum posts) should go to either StackOverflow, or to the issues list for that project.

In case you are interested in using Kendo MVVM for this scenario please let me know and I will be glad to provide you with a guidance how to achieve that.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sameer
Top achievements
Rank 1
answered on 06 Jan 2014, 02:47 PM
Yeah that will be great if you can provide me some sample code to achieve this.

Thanks!
0
Alexander Valchev
Telerik team
answered on 08 Jan 2014, 08:37 AM
Hi Sameer,

Here is an example that demonstrates how the scenario can be implemented through Kendo MVVM.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Sameer
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Sameer
Top achievements
Rank 1
Share this question
or