I am trying to get a cell edited on being clicked.
I have tried-
$('#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%",sortable:true,
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%",sortable:true},
{field:'runon',title : 'Runon',width:"20%",sortable:true,
editor:'text'},
{field:'thread',title : 'Thread',width:"10%",
editor:{type:'numberbox'},sortable:true} ]],
});
AND THIS
onClickCell:function(field,row){
console.clear();
console.log("in");
if (field === 'thread'){
console.log("if"); // in and if get printed on the console
field.editor = 'numberbox';
}
else{
console.log("null");
field.editor = null;
}
}
Both aren't working.