[script] userApp.factory('userFactory', function ($http) { return { getFormData: function (callback) { $http.get('api/AngularForm').success(callback); } } |
[script] userFactory.getFormData(function (results) { $scope.dataList = results.localData; obj = $("#treeView").data("ejTreeView"); obj.option("fields", { id: "id", text: "name", parentId: "pid", hasChild: "hasChild", dataSource:$scope.dataList }) |
Hi Rob,
Thanks for the update,
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
For your convenience we have prepared the workaround solution to resolve the reported issue.
By refreshing (unbind then bind) the events, after setting the fields property in treeview will resolve the issue.
Please find the below code snippet:
function getFormData() { userFactory.getFormData(function (data) { $scope.dataList = data.localData; obj = $("#treeView").data("ejTreeView"); obj.option("fields", { id: "id", text: "name", parentId: "pid", hasChild: "hasChild", dataSource: $scope.dataList }); obj._off(obj.element, 'keydown'); obj._on(obj.element, "keydown", obj._KeyPress); }) } |
Please use highlighted code in your project and let us know if you have any further queries,
Regards,
Sasikala Nagarajan