Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery EasyUI DataGrid - Creating a Property Grid

jQuery EasyUI DataGrid - Creating a Property Grid

The property grid has a built-in expand/collapse button that can easily group rows. You can simply create a hierarchical list of editable properties.

Set up the HTML



    

Prepare the JSON data



    [

        {"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

            }

        }}

    ]

As you can see, creating a property grid does not require any JavaScript code. You can simply extend the editor type through inheritance.

Download the jQuery EasyUI example

jeasyui-datagrid-datagrid20.zip