JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic PropertyGrid - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
var data = {"total":7,"rows":[
{"name":"Text","value":"Bill Smith","editor":"text"},
{"name":"NumberBox","value":"40","editor":"numberbox"},
{"name":"DateBox","value":"01/02/2012","editor":"datebox"},
{"name":"ComboBox","value":"2","desc":"desc2",
"editor":{
"type":"combobox",
"options":{
"valueField":"id",
"textField":"desc",
"data":[
{"id":"1","desc":"desc1"},
{"id":"2","desc":"desc2"},
{"id":"3","desc":"desc3"},
{"id":"4","desc":"desc4"}
]
}
}
}
]}
$(function(){
$('#pg').propertygrid({
data: data,
columns: [[
{field:'name',title:'Name',width:100,sortable:true},
{field:'value',title:'Value',width:100,resizable:false,
formatter: function(value,row){
if (row.name == 'ComboBox'){
return row.desc || value;
} else {
return value;
}
}
}
]],
scrollbarSize: 0,
onEndEdit: function(index,row){
if (row.name == 'ComboBox'){
var ed = $(this).propertygrid('getEditors', index)[0];
row.desc = $(ed.target).combobox('getText');
}
}
})
})
</script>
</head>
<body>
<h2>Basic PropertyGrid</h2>
<table id="pg" style="width:300px;height:200px">
</table>
</body>
</html>