Показать сообщение отдельно
  #1 (permalink)  
Старый 13.02.2017, 09:15
Кандидат Javascript-наук
Отправить личное сообщение для AlexTrader Посмотреть профиль Найти все сообщения от AlexTrader
 
Регистрация: 23.12.2016
Сообщений: 121

Не выводятся данные в kendo tree list
Доброго времени суток, форумчане! Помогите пожалуйста, не получается выявить причину, по которой не выводятся данные в kendo tree list
var treelistDataSource = new kendo.data.TreeListDataSource({
            transport: {
                read: function (e) {
                    var searchTerm = $('#product-search').val();
                    Ajax2.executeAjaxRequest(QueryParameters.GetProductsParams(searchTerm), e);
                },
                update: function (e) {
                },
                destroy: function (e) {
                },
                create: function (e) {
                },

                // Post changed models in the `model` field, as serialized JSON
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }
            },

            // Enable batch updates
            batch: true,

            // Define the model schema
            schema: {
                model: {
                    id: "id",
                    fields: {
                        id: { type: "number", nullable: false },
                        parentId: { field: "parentId", nullable: true },
                        title: { type: "string", nullable: false }
                    }
                }
            }
        });

       

        TLGoods = $("#goodtreelist").kendoTreeList({
            dataSource: treelistDataSource,
            height: function () {
                return $(window).height() - 120;
            },
            resizable: true,
            groupable: true,
            editable: {
                move: true
            },
            drop: function (e) {
                if (e.valid) {
                    ProductActions.DropCat(e.source.id, e.destination);
                }
            },
            columns: [
                { field: "id", title: "#", width: 60 },
                { field: "parentId", title: "parentId", width: 60 },
                { field: "title", title: "Название", expandable: true },
                {
                    field: "Action",
                    title: "Действия",
                    width: 80,
                    template: "<div class='b-task'>" + "#=ProductActions.TLGoodAdd(data)#" + "#=ProductActions.TLGoodEdit(data)#" + "#=ProductActions.TLGoodDelete(data)#" + "</div>",
                },
            ],
            toolbar: "<div class='b-task'>" + "#=ProductActions.TLGoodButtonCatAdd()#" + "#=ProductActions.TLGoodButtonAdd()#" + "</div>",
        }).data("kendoTreeList");
Ответить с цитированием