Title: [SOLVED]Combo Box inside TreeGrid Post by: raghav94 on June 25, 2017, 09:13:10 AM My data is being fetched from a JSON and being put in a TreeGrid.
I am trying to make one of the columns as a combox but only the first row gets converted. I am using the coloumn formatter but clearly I am doing something wrong. Attaching a screenshot as well. Following is the code where I use the formatter: function initializeTree(testsuiteArray){ $('#test').treegrid({ data : testsuiteArray, idField : "id", treeField : "tsName", fitColumns : true, resizeHandle : "right", checkbox: "true", loadMsg : "Processing, please wait …", // multiSort: "true", order: "asc", // sortName: "tsName", // remoteSort: true, columns:[[ {field:'tsName',title : 'Testsuites',width:"20%",sortable:true}, {field:'exeplatform',title : 'Exec PlatForm',width:"30%", formatter: function(){ return '<select id="cc" class="easyui-combobox" name="dept" style="width:200px" multiple=true;>' + '<option value="aa">aitem1</option>' + '<option>bitem2</option>' + '<option>bitem3</option>' + '<option>ditem4</option>' + '<option>eitem5</option>' + '</select>'; } }, {field:'exetype',title : 'Exe Type',width:"20%"}, {field:'runon',title : 'Runon',width:"20%",sortable:true}, {field:'thread',title : 'Thread',width:"10%"} ]] }); Any help would be much appreciated. Title: Re: Combo Box inside TreeGrid Post by: jarry on June 26, 2017, 07:57:25 AM When load data successfully, please create the combobox components manually.
Code: $('#test').treegrid({ Title: Re: Combo Box inside TreeGrid Post by: raghav94 on June 29, 2017, 02:38:06 AM It worked.
Thank you ;D |