Ext. UX. Tree. columntree is used here. This is a treepanel extension class, which is included in the official package downloaded from extjs.
1.
Problem description: The Tree header is displayed normally, the data part is displayed normally in Firefox, and cannot be displayed in IE. (Such as the following code)
Cause resolution: the class cannot be used as the column name. There may be problems in IE. We recommend that you change it to another one, such as classname.
var tree = new Ext.ux.tree.ColumnTree({ id: 'TreeGridId', width: 1000, height: "100%", rootVisible:false, autoScroll:true, title: ' ', renderTo: Ext.getBody(), columns:[{ header:'Name', width:180, dataIndex:'name' },{ header:'Class', width:100, dataIndex:'class' },{ header:'Owner', width:100, dataIndex:'owner' }], loader: new Ext.tree.TreeLoader({ dataUrl:'jsdata.dat', uiProviders:{ 'col': Ext.ux.tree.ColumnNodeUI } }), root: new Ext.tree.AsyncTreeNode({ text:'root' }) });
The JSON data format is as follows:
[{name:'teste',class:'ClassName',owner:'testOwner',uiProvider:'col'},{name:'teste2',class:'ClassName2',owner:'testOwner2',uiProvider:'col'}]
2.
In addition, if the JSON data format is not standard, such as the absence of commas, it may also lead to normal Firefox and abnormal IE.
Conclusion: The tree data shows that Firefox is normal and IE is not normal. Generally, no error is reported. It is difficult to find the cause directly through the error console or debug tool, but it can be guessed that, the reason should be that the JSON data format is above. You can gradually find the reason from the display of a piece of data and a column.