Hi Daniel,
We need to use the type="text/ng-template" script to render the TreeGrid template using angularJS. We have prepared the work around and rendered the custom column in TreeGrid by using “columnTemplate” property. And also rendered the button in a custom field using template and bind the event for button click action.
Please find the code example below:
<script type="text/ng-template" id="columnTemplate"> <div> <button ng-click="$parent.clickme()" style="margin-left:5px">Click</button> </div> </script> <script> var columns = [ /// { field: "customfield", headerText: "Custom Field", isTemplateColumn: true, angularTemplate: "#columnTemplate" }, ] .controller('TreeGridCtrl', function ($scope) { $scope.columns = columns; //inline function for button click event $scope.clickme = function () { alert("We can customize the actions here") } }); </script> |
Please find the sample from below location.
Regards,
Jone sherine P S