文檔半島外圍網(wǎng)上直營>>jQuery EasyUI使用教程>>jQuery EasyUI使用教程:創(chuàng)建一個屬性網(wǎng)格
jQuery EasyUI使用教程:創(chuàng)建一個屬性網(wǎng)格
Kendo UI for jQuery——創(chuàng)建現(xiàn)代Web應(yīng)用程序的最完整UI庫!查看詳情>>>
屬性網(wǎng)格帶有一個內(nèi)置的expand(展開)/collapse(合并)按鈕,可以簡單地為行分組。您可以簡單地創(chuàng)建一個可編輯屬性的分層列表。

設(shè)置HTML
<table id="tt" class="easyui-propertygrid" style="width:300px" url="propertygrid_data.json" showGroup="true" scrollbarSize="0" ></table>
準(zhǔn)備json數(shù)據(jù)
[ {"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":"numberbox"}, {"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":"bill@gmail.com","group":"Marketing Settings","editor":{ "type":"validatebox", "options":{ "validType":"email" } }}, {"name":"FrequentBuyer","value":"false","group":"Marketing Settings","editor":{ "type":"checkbox", "options":{ "on":true, "off":false } }} ]
正如您所看到的,屬性網(wǎng)格的創(chuàng)建不需要任何的javascript代碼。您可以簡單地繼承擴(kuò)展editor類型。
下載EasyUI示例: