call ajax requst that returns jsonformate like this
[{"ServiceCategoryId":1,"ServiceParentCategoryId":0,"ServiceCategory":"hospital"},
{"ServiceCategoryId":2,"ServiceParentCategoryId":1,"ServiceCategory":"bloodtest"},
{"ServiceCategoryId":3,"ServiceParentCategoryId":0,"ServiceCategory":"water"}]
how to implement js tree with this data
here ServiceParentCategoryId is 0 then it is Parent
Servicecategoryid = servicecategoryId then it is child of that node
Nitin SontakkePosted Feb 15, 2017, 12:59 AM
Nitin SontakkePosted Feb 15, 2017, 1:08 AM
Santosh SasupalliPosted Feb 15, 2017, 1:02 AM
'core': {
'data': {
'url': 'http://localhost:63730/home/getcategories/',
'data': function (node) {
return {
'id': node.id
};
}
}
}
});