当前位置: 代码迷 >> ASP >> LigerUI中生成GRID与TREE的【JSON数据】与Asp.Net的【变量数据】(便利测试)
  详细解决方案

LigerUI中生成GRID与TREE的【JSON数据】与Asp.Net的【变量数据】(便利测试)

热度:98   发布时间:2012-11-25 11:44:31.0
LigerUI中生成GRID与TREE的【JSON数据】与Asp.Net的【变量数据】(方便测试)

一、下拉框GRID数据

[
  {"id":40,"value":null,"text":"管理员      ","icon":null,"fatherid":null,"children":null},
  {"id":1,"value":null,"text":"操作员      ","icon":null,"fatherid":null,"children":null}
]

string json="[{\"id\":40,\"value\":null,\"text\":\"管理员      \",\"icon\":null,\"fatherid\":null,\"children\":null},{\"id\":1,\"value\":null,\"text\":\"操作员      \",\"icon\":null,\"fatherid\":null,\"children\":null}]";

二、下拉框TREE数据

[

  {"id":9,"value":null,"text":"学校","icon":null,"fatherid":"0","children":
    [
      {"id":1,"value":null,"text":"办公室","icon":null,"fatherid":"9","children":null},
      {"id":12,"value":null,"text":"教务室","icon":null,"fatherid":"9","children":null}
    ]
  },
  {"id":3,"value":null,"text":"教育","icon":null,"fatherid":"0","children":
    [
      {"id":4,"value":null,"text":"教材处","icon":null,"fatherid":"3","children":null},
      {"id":5,"value":null,"text":"人事处","icon":null,"fatherid":"3","children":null}
    ]
  }
]

 m_json="[{\"id\":9,\"value\":null,\"text\":\"学校\",\"icon\":null,\"fatherid\":\"0\",\"children\":[{\"id\":1,\"value\":null,\"text\":\"办公室\",\"icon\":null,\"fatherid\":\"9\",\"children\":null},{\"id\":12,\"value\":null,\"text\":\"教务室\",\"icon\":null,\"fatherid\":\"9\",\"children\":null}]},{\"id\":3,\"value\":null,\"text\":\"教育\",\"icon\":null,\"fatherid\":\"0\",\"children\":[{\"id\":4,\"value\":null,\"text\":\"教材处\",\"icon\":null,\"fatherid\":\"3\",\"children\":null},{\"id\":5,\"value\":null,\"text\":\"人事处\",\"icon\":null,\"fatherid\":\"3\",\"children\":null}]}]"



三、GRID表数据

    {"Total":"1","Rows":[{"Label_Id":3,"HelpCode":"8     ","Max":6,"Sort":2}],"num1":0,"num2":0,"num3":0}

    m_json="{\"Total\":\"1\",\"Rows\":[{\"Label_Id\":3,\"HelpCode\":\"8     \",\"Max\":6,\"Sort\":2}],\"num1\":0,\"num2\":0,\"num3\":0}"


四、GRID树数据


{"Total":"4","Rows":[
    {"ObjHelpCode":"bj        ","ObjId":1,"ObjName":"白","ObjNum":0,"ObjDesc":"","Sort":1,"FatherId":0,"children":
      [
       {"ObjHelpCode":"mt        ","ObjId":3,"ObjName":"台","ObjNum":0,"ObjDesc":"","Sort":1,"FatherId":1,"children":
         [
          {"ObjHelpCode":"mtybj     ","ObjId":8,"ObjName":"迎宾","ObjNum":0,"ObjDesc":"","Sort":1,"FatherId":3,"children":null},
         ]
       },
       {"ObjHelpCode":"ssdcgh    ","ObjId":61,"ObjName":"珠红","ObjNum":0,"ObjDesc":"","Sort":5,"FatherId":56,"children":null}
      ]
    }
  ]
},"num1":0,"num2":0,"num3":0}


m_json="{\"Total\":\"4\",\"Rows\":[
    {\"ObjHelpCode\":\"bj        \",\"ObjId\":1,\"ObjName\":\"白\",\"ObjNum\":0,\"ObjDesc\":\"\",\"Sort\":1,\"FatherId\":0,\"children\":
      [
       {\"ObjHelpCode\":\"mt        \",\"ObjId\":3,\"ObjName\":\"台\",\"ObjNum\":0,\"ObjDesc\":\"\",\"Sort\":1,\"FatherId\":1,\"children\":
         [
          {\"ObjHelpCode\":\"mtybj     \",\"ObjId\":8,\"ObjName\":\"迎宾\",\"ObjNum\":0,\"ObjDesc\":\"\",\"Sort\":1,\"FatherId\":3,\"children\":null},
         ]
       },
       {\"ObjHelpCode\":\"ssdcgh    \",\"ObjId\":61,\"ObjName\":\"珠红\",\"ObjNum\":0,\"ObjDesc\":\"\",\"Sort\":5,\"FatherId\":56,\"children\":null}
      ]
    }
  ]"
},\"num1\":0,\"num2\":0,\"num3\":0}


注名:变量内容记得放在一行,多行需要加引号。