码迷,mamicode.com
首页 > Web开发 > 详细

EasyUI 各种json数据格式

时间:2014-07-01 22:10:05      阅读:845      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   strong   

EasyUI中,用到的各种数据的json数据格式

1. combobox  

bubuko.com,布布扣
[{ 
"id":1, 
"text":"text1" 
},{ 
"id":2, 
"text":"text2" 
},{ 
"id":3, 
"text":"text3", 
"selected":true 
},{ 
"id":4, 
"text":"text4" 
},{ 
"id":5, 
"text":"text5" 
}] 
View Code

2. datagrid

bubuko.com,布布扣
[{
    "code":"001",
    "name":"name1",
    "addr":"Address1",
    "col4":"Col41"
},{
    "code":"002",
    "name":"name2",
    "addr":"Address2",
    "col4":"Col42"
},{
    "code":"003",
    "name":"name3",
    "addr":"Address3",
    "col4":"Col43"
},{
    "code":"004",
    "name":"name4",
    "addr":"Address4",
    "col4":"Col44"
},{
    "code":"005",
    "name":"name5",
    "addr":"Address5",
    "col4":"Col45"
}]
View Code    

3. tree

bubuko.com,布布扣
[{
    "id":1,
    "text":"Folder1",
    "iconCls":"icon-ok",
    "children":[{
        "id":2,
        "text":"File1",
        "checked":true
    },{
        "id":3,
        "text":"Folder2",
        "state":"open",
        "children":[{
            "id":4,
            "text":"File3",
            "attributes":{
                "p1":"value1",
                "p2":"value2"
            },
            "checked":true,
            "iconCls":"icon-reload"
        },{
            "id":8,
            "text":"Async Folder",
            "state":"closed"
        }]
    }]
},{
    "text":"Language",
    "state":"closed",
    "children":[{
        "id":"j1",
        "text":"Java"
    },{
        "id":"j2",
        "text":"C#"
    }]
}]
View Code

4. propertygrid

bubuko.com,布布扣
[{
    "name":"Name",
    "value":"Bill Smith",
    "group":"ID Settings",
    "editor":"text"
},{
    "name":"Address",
    "value":"",
    "group":"ID Settings",
    "editor":"text"
},{
    "name":"Age",
    "value":"40",
    "group":"ID Settings",
    "editor":"text"
},{
    "name":"Birthday",
    "value":"01/02/2012",
    "group":"ID Settings",
    "editor":"datebox"
},{
    "name":"SSN",
    "value":"123-456-7890",
    "group":"ID Settings",
    "editor":"text"
},{
    "name":"Email",
    "value":"Bil@gmail.com",
    "group":"Marketing Settings",
    "editor":{
        "type:":"validatebox",
        "options":"email"
    }
},{
    "name":"FrequentBuyer",
    "value":false,
    "group":"Marketing Settings",
    "editor":{
        "type":"checkbox",
        "options":{"on":true,"off":"false"}
    }
}]
View Code

5. treegrid

bubuko.com,布布扣
[{
    "id":1,
    "region":"Wyoming",
    "children":[{
        "id":11,
        "region":"Albin",
        "091":"1800",
        "092":"1800",
        "093":"1903",
        "094":"2193",
        "101":"2133",
        "102":"1923",
        "103":"2018",
        "104":"1928"
    },{
        "id":12,
        "region":"Canon",
        "091":"1800",
        "092":"1800",
        "093":"1903",
        "094":"2193",
        "101":"2133",
        "102":"1923",
        "103":"2018",
        "104":"1928"
    },{
        "id":13,
        "region":"Egbert",
        "091":"1800",
        "092":"1800",
        "093":"1903",
        "094":"2193",
        "101":"2133",
        "102":"1923",
        "103":"2018",
        "104":"1928"
    }]
},{
    "id":2,
    "region":"Washington",
    "children":[{
        "id":21,
        "region":"Bellingham",
        "091":"1800",
        "092":"1800",
        "093":"1903",
        "094":"2193",
        "101":"2133",
        "102":"1923",
        "103":"2018",
        "104":"1928"
    },{
        "id":22,
        "region":"Other",
        "091":"1800",
        "092":"1800",
        "093":"1903",
        "094":"2193",
        "101":"2133",
        "102":"1923",
        "103":"2018",
        "104":"1928"
    }]
}]
View Code

 

EasyUI 各种json数据格式,布布扣,bubuko.com

EasyUI 各种json数据格式

标签:style   blog   http   java   color   strong   

原文地址:http://www.cnblogs.com/jisi2012/p/3816687.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!