I had a combogrid, which looked like this:
$('#cg').combogrid({
idField:'id',
textField:'custom_desc',
columns:[[
{field:'desc1', title:'Description1', width:50},
{field:'desc2',title:'Description2',width:200}
]]
});
Where as the user selected a value, the "custom_desc", which is composed from multiple columns, appeared in the combo field.
Now I've updated to combotreegrid and this is no longer working. The parameter "treeField" replaces "textField" and only this one column is displayed in the box, when a value is selected, textField is ignored. I've tried to work around with "onSelect" method, but it doesn't work either. onHidePanel is working fine, if the panel is closed without selecting anything. On the other hand though, when selecting, onSelect is fired twice with onHidePanel once inbetween, and "setText" is ignored everywhere. To be precise: it's not completely ignored, it's stored as the combotreegrids text, but it's not displayed in the combo. Instead the "treeField" is displayed.
Is this a bug or am I doing something wrong? Here's the code:
$('#cg').combotreegrid({
idField:'id',
treeField:'desc1',
textField:'custom_desc',
columns:[[
{field:'desc1', title:'Description1', width:50},
{field:'desc2',title:'Description2',width:200}
]],
onSelect: function(row) {
console.log("onSelect");
$('#cg').combotreegrid('setText', 'something got selected...');
},
onHidePanel: function() {
console.log("onHidePanel");
$('#cg').combotreegrid('setText', "PANEL HIDDEN AJAJAJAJAJ");
}
});