Many thanks for your reply.
I managed to show icons, but when I click on the item, the icon changes and moves to the right.
initial view
after click on "Athletes"
And there is another problem which is related to hierarchical navigation.
I'm using:
// var datamanager;
var dataext = new ej.data.DataManager({
url: 'http://localhost/rubw2/basic/web/nav/navleft',
adaptor: new ej.data.WebApiAdaptor()
});
// });
// console.log(datamanager);
// TreeView initialization
var mainTreeView= new ej.navigations.TreeView({
fields: { dataSource: dataext, id: 'nodeId', iconCss: 'nodeIcon', text: 'nodeText', child: 'nodeChild', hasChildren: 'hasChild', parentID: 'pid' }, expandOn: 'Click'
});
with this response from the backend server:
{
"Items": [
{
"nodeId": "1",
"nodeIcon": "e-icons e-search",
"nodeText": "Login",
"url": "/home"
},
{
"nodeId": "5",
"nodeIcon": "e-icons e-search",
"nodeText": "Athletes",
"url": "/athlets",
"hasChild": false
},
{
"nodeId": "7",
"nodeIcon": "e-icons e-search",
"nodeText": "Analysis",
"url": "/athlets",
"hasChild": true
},
{
"nodeId": "8",
"nodeIcon": "e-icons e-search",
"nodeText": "Age classes",
"url": "/athlets",
"pid": "7"
},
{
"nodeId": "9",
"nodeIcon": "e-icons e-search",
"nodeText": "Athletes",
"url": "/athlets",
"pid": "7"
}
],
"Count": 5
}
and I get a treeview like this:
Initial view
after click on "Analysis"
the goes forever like a recursion.
How can this happen?
Regards,
Stephan