0

Kindly let me know how to add two controls in one column of AngularJS ui-grid table. We have requirement to have two controls in one. Don't know how to achieve this.

Thanks and regards, Arti

Aarti
  • 1

1 Answers1

0

If you are looking to add some buttons that perform actions on the grid row that you are in you can simply add a column like so.

e.g.

{
    name: 'actions',
    displayName: 'Actions',
    enableCellEdit: false,
    cellTemplate: 'Actions.html'
}

Then put the buttons into the html file.

e.g.

<span>
    <a href ng-click="grid.appScope.action(row.entity)"><i class="fa fa-edit"></i></a>
</span>

This allows you to put a function into your controller that is referred to via the grid.appScope. and pass it the row.entity, which is the data from the row.

Wes
  • 172
  • 11