Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Null on DataTextField for TreeView

$
0
0

I need a bit of guidance on Treeview. My hierarchical datasource makes an ajax call to a webservice that returns a NULL on he first node of the tree. There is a reason for this because the Parent is the node represents the name of the actual Tree. Each subsequent node is the actual tree nodes. Also the JSON object returned is a nested, Complex object.

 Here is an example: 

{"id": 1, "isSSMNameNode": true, "tgtWeight": 0.0, "currWeight": 0.0, "hasChildNode": true, "ext_model_id": 1, "parent": null, "SSM": {"id": 1, "securitySelectionModelName": "vincent", "userCreatedModel": "[{\"classificationName\":\"vincent\",\"id\":1,\"expanded\":true,\"hasChildNode\":true,\"child\":[{\"classificationName\":\"MBS\",\"id\":14,\"expanded\":true,\"hasChildNode\":true,\"child\":[{\"classificationName\":\"Money Market\",\"id\":17,\"hasChildNode\":false}]}]}]", "classificationNames": []}, "classificationNameNode": null}

 

I've tried to use Schema.parse to make the nodes into a flat object but for some reason I lose the tree hierarchy when I try to do: 

 

varnode = {
..
hasChildren = response.hasChildNode;
..
}
 

For some reason the hasChildren disappears from the node object  so that didn't work for me. Any ideas on how to get the first node to produce some value from the object and then have the name from the subsequent JSON object return?

 

What w 

 

 


Viewing all articles
Browse latest Browse all 78072

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>