All I want to do is make input disabled and when the user clicks on the edit button they should be able to edit the text
.
AngularJS Editable Grid Demo
FileID | File Name | Parent Id | Type | ||
|---|---|---|---|---|---|
{{node.FileID}} | @*{{node.FileName}} *@ @*{{node.FileName}}*@ {{node.FileName}} | @*{{node.ParentID}} *@ {{node.ParentID}} | @*{{node.Type}} *@ {{node.Type}} |
myfunction
var app = angular.module('app', ['angularTreeview']);
app.controller('treecontroller', function ($scope, $http) {
$http.get('/Home/GetFileStructure').then(function (response) {
$scope.List = response.data.treeList;
});
$scope.toggleEdit = function (node) {
node.showEdit = node.showEdit ? false : true;
//node.showEdit = node.showEdit ? false : false;
}
$http({
method: 'POST',
url: '/Home/GetFileStructure'
})
.then(function (response) {
console.log(response);
$scope.List = response.data.treeList;
angular.forEach($scope.List, function (obj) {
obj["showEdit"] = true;
})
}, function (error) {
console.log(error);
});
});
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Thiruppathi RPosted Jun 7, 2017, 4:14 AM