PDA

View Full Version : How to re-render treepanel after setRootNode()?



xjscrafter
5 Nov 2014, 9:05 AM
I am setting the root node for a treepanel, and after that completes I'd like to re-render the treepanel, because I have a renderer on the column:


columns: [{
xtype: 'treecolumn',
flex: 1,
sortable: false,
dataIndex: 'text',
renderer : function(value, metaData, record) {
if(!Ext.isEmpty(record) && CommonUtil.hasProperty(record, 'data.mounted') && record.data.mounted) {
metaData.tdCls = 'mountedOne';
return ('<span>' + value + ' <span style="color: #0E8208; font-style: italic;font-weight: bold;">(' + StringMessages.getMessage('Common_Mounted') + ') </span></span>')
} else {
return value;
}
}
}]

slemmon
7 Nov 2014, 12:28 PM
Try with treepanel.getView().refresh()