User defined button action in ember-datatables

User defined button action in ember-datatables

g8anushag8anusha Posts: 2Questions: 1Answers: 0

Hi, I want to add a new button with datatables, only to place the button in the line of the datatable. In the action method of the button, I would want to call a controller's action.
I tried many ways, but I am not able to get the instance of a controller, or any instance of the outside world. Please help me out.

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    there is no datatables action associated with a custom button. You are going to have to explain what you are trying to do

  • g8anushag8anusha Posts: 2Questions: 1Answers: 0

    Sorry, I want to call one method in the controller like :

    options[buttons] = [{
    text: 'Create',
    class: 'create-new',
    action: function(e) {
    //unable to get instance of any outside world.
    }

    In the action method, I will want to use the controller, and do transitionToRoute to another page.

This discussion has been closed.