Skip to content Skip to sidebar Skip to footer

How To Show Checkboxes And Button In Ui Grid With Dynamic Columnheaders

I want to create a dynamic UI-Grid with columns and rows dynamically generated.I have used the help from other post in Stack Overflow and able to create the grid as follows:- HTML

Solution 1:

you can use "cellTemplate" for each column inside $scope.myData, and i think you need to call a function when user click on each button, here is a simple example:

cellTemplate: '<divclass="ui-grid-cell-contents"ng-click="grid.appScope.editProperties(row.entity)"><aclass="btn btn-xs btn-grid btn-info"><iclass="fa fa-pencil-square-o"></i></a></div>'

function editProperties(rowEntity) {
                //write everything u want
}

More example and documentation Here

Post a Comment for "How To Show Checkboxes And Button In Ui Grid With Dynamic Columnheaders"