dhtmlXPropertySheet is a component which displays or provides ability to edit values of object properties.
To initialize propertysheet, you need to
There are two files that need to be included
<script src="../../codebase/dhtmlx.js" type="text/javascript"></script> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlx.css">
PropertySheet is initialized in HTML container:
<<div id="property_container" style="width:600px;height:400px"></div>
To initialize PropertySheet you need to set only two “container” and “name_width” property:
var psheet = new dhtmlXPropertySheet({ container:"property_container", name_width:150 });
Elements of the dhtmlXPropertySheet constructor:
DataMap supports the same methods for data loading as DataView:
map.load("properties.json","json");
Each property consits of 4 elements:
The example of JSON data:
[{"id":"1", "type":"label", "value":"Audi A6"}, {"id":"2", "name":"Color", "type":"text", "value":"Grey metallic"}, {"id":"3", "name":"Fuel type", "type":"select", "value":"3", "options":{"1":"Diesel","2":"Gas","3":"Pertol"}}, {"id":"4", "name":"Automatic gearbox", "type":"checkbox", "value":"1"}}, {"id":"5", "name":"Price", "type":"text", "value":"29000 EUR"}]
Here is the result: