来自嵌套json

时间:2017-06-21 12:50:25

标签: jquery json kendo-ui datagrid kendo-grid

我有以下表格和JSON结构,我需要用它来制作剑道网格as shown in figure there is a nested hierarchy in the columns and finally a table like grid.

在kendo中,我尝试使用列和数据源,但问题是我的列是嵌套的,哪些是嵌套的。例如,有多个模块,每个模块都有具有升级的活动。请建议我需要使用什么kendo功能来实现它。另外如果你想改变json结构,请推荐一个更好的结构!

以下是精确的JSON。(你需要美化它!)

[
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Read and Begin Project",
        "Modules": "Module 2",
        "Weightage": 10,
        "YourWeightedGrade": 1.2,
        "YourGrade": 12,
        "UniqueActivityId": 149
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Analysis",
        "Modules": "Module 2",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 163
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Exercise 2",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 151
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Exercise 1",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 162
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Analysis 1",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 164
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Analysis 2",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 150
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Analysis 3",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 148
    },
    {
        "CustomerID": 2759,
        "StudentName": "Diksha Goyal",
        "Activities": "Submit Analysis",
        "Modules": "Module 7",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 155
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Read and Begin Project",
        "Modules": "Module 2",
        "Weightage": 10,
        "YourWeightedGrade": 1.2,
        "YourGrade": 12,
        "UniqueActivityId": 149
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 2",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 163
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Exercise 2",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 151
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Exercise 1",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 162
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Analysis 1",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 164
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Analysis 2",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 150
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Analysis 3",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 148
    },
    {
        "CustomerID": 2759,
        "StudentName": "Avinash Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 7",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 155
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Read and Begin Project",
        "Modules": "Module 2",
        "Weightage": 10,
        "YourWeightedGrade": 1.2,
        "YourGrade": 12,
        "UniqueActivityId": 149
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 2",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 163
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Exercise 2",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 151
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Exercise 1",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 162
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Analysis 1",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 164
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Analysis 2",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 150
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Analysis 3",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 148
    },
    {
        "CustomerID": 2759,
        "StudentName": "Nikhil Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 7",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 155
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Read and Begin Project",
        "Modules": "Module 2",
        "Weightage": 10,
        "YourWeightedGrade": 1.2,
        "YourGrade": 12,
        "UniqueActivityId": 149
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Analysis",
        "Modules": "Module 2",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 163
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Exercise 2",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 151
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Exercise 1",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 162
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Analysis 1",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 164
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Analysis 2",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 150
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Analysis 3",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 148
    },
    {
        "CustomerID": 2759,
        "StudentName": "Martin garrix",
        "Activities": "Submit Analysis",
        "Modules": "Module 7",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 155
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Read and Begin Project",
        "Modules": "Module 2",
        "Weightage": 10,
        "YourWeightedGrade": 1.2,
        "YourGrade": 12,
        "UniqueActivityId": 149
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 2",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 163
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Exercise 2",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 151
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Exercise 1",
        "Modules": "Module 3",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 162
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Analysis 1",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 164
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Analysis 2",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 150
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Analysis 3",
        "Modules": "Module 4",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 148
    },
    {
        "CustomerID": 2759,
        "StudentName": "Rishikesh Kumar",
        "Activities": "Submit Analysis",
        "Modules": "Module 7",
        "Weightage": 0,
        "YourWeightedGrade": 0,
        "YourGrade": 0,
        "UniqueActivityId": 155
    }
]

0 个答案:

没有答案