pedro83
November 9, 2011, 2:12pm
#1
Hi.
Im working with the propertygrid and i want to put a combo in a cell. I was reading and i found that the component supports a “list” type. The problem is that the list not has a key for each list value and the combo has this property, but i can´t find the way to loadit.
Here is the xml that im trying to load.
NameTest value
Description
Border
BorderSize
BorderStyle
one
two
three
Thanks.
Olga
November 16, 2011, 9:20am
#3
It can be done with “combo” eXCell type. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … ll_combo&s []=combo
pedro83
November 16, 2011, 1:07pm
#4
Olga, thanks for the answer.
I can´t do it work.
Here is an example of what im trying to do.
<head>
<title>Setting cells and column properties</title>
<link rel="STYLESHEET" type="text/css" href="../utils/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../utils/dhtmlxgrid_dhx_skyblue.css">
<link rel="STYLESHEET" type="text/css" href="../utils/dhtmlxtreegrid_property.css">
<script src="../utils/dhtmlxcommon.js"></script>
<script src="../utils/dhtmlxgrid.js"></script>
<script src="../utils/dhtmlxgridcell.js"></script>
<script src="../utils/dhtmlxtreegrid.js"></script>
<script src="../utils/dhtmlxtreegrid_property.js"></script>
</head>
<body onload="init()">
<div id="grid_here" style="height:400px; width:600px; position:relative;">
</div>
<xml id="xmldataprop">
<rows>
<row><cell>Name</cell><cell type="ed">Test value</cell>
</row>
<row><cell>Description</cell><cell type="ed"/>
</row>
<row open="1">
<cell>Border</cell>
<row>
<cell>BorderStyle</cell>
<cell xmlcontent="1" editable="0">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
</cell>
</row>
<row>
<cell>BorderSize</cell>
<cell type="ed" validate="int"/>
</row>
</row>
</rows>
</xml>
<script type="text/javascript" charset="utf-8">
function init()
{
mygrid = new dhtmlXPropertyGrid('grid_here');
mygrid.setImagePath('../utils/dhtmlxGrid/codebase/imgs/');
mygrid.init();
mygrid.loadXMLString(document.getElementById("xmldataprop").innerHTML, function()
{
mygrid.setSizes();
});
}
</script>
</body>
Thanks.
Olga
November 17, 2011, 4:12pm
#5
You can find working example here dhtmlx.com/docs/products/dht … combo.html
Note, “combo” eXcell type is available in PRO version only