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

TreeList & asp.net mvc 5 samples

1 Answer 96 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Joyce
Top achievements
Rank 1
Joyce asked on 09 Nov 2015, 02:27 AM

I tried to use TreeList with mvc5. 

kendoUI:

   .kendoTreeList({
        dataSource: {
            type: "aspnetmvc-ajax",
            transport: {
                read: {
                    url: "/Common/CommonProductBomInfo",
                    type: "POST",
                    data: { ProductBom: GA.current.dialog.param },
                },
                //parameterMap: function (options, operation) {
                //    if (operation !== "read" && options.models) {
                //        return { models: kendo.stringify(options.models) };
                //    }
                //}
            },
            schema: {
                //data: "Data",
                //total: "Total",
                //errors: "Errors",
                model: {
                    id: "id",
                    parentId: "parentId",
                    fields: {
                        id: { type: "string", nullable: false },
                        parentId: { type: "string", nullable: true }
                    },
                    expanded: true
                }
            }
        },
        filterable: true,
        sortable: true,
        height:490,
        toolbar: ['excel'],
        columns: [
            { field: "Part_Code", title: "PartCode", width: 200 },
            { field: "Part_Name", title: "PartName", width: 160 },
            { field: "Part_Size", title: "PartSize", width: 120 },
            { field: "Part_Model", title: 'PartModel', width: 120 },
            { field: "Part_Material", title: 'PartMaterial', width: 140 }
        ]
    });​

MVC:

    DataSourceResult result = Business.CommonProductBom(Guid.Parse(ProductBom)).ToDataSourceResult(request);
     return Json(result);

 

It is not working well.

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 11 Nov 2015, 07:47 AM

Hello Joyce,

 

`It is not working well.` - what does it mean? Please clarify.

 

Providing isolated runnable example will also help us to resolve this.

 

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