How to give the onclick event for the action link of the administration grid

In the first step we need to create a block file:

    & # 39; custom_action_list & # 39 ;,
& # 39; label & # 39; => __ (& # 39; Custom Action List & # 39;),
& # 39; class & # 39; => & # 39; add & # 39 ;,
& # 39; button_class & # 39; => & # 39; & # 39 ;,
& # 39; class_name & # 39; => & # 39; Magento  Backend  Block  Widget  Button  SplitButton & # 39 ;,
& # 39; options & # 39; => $ this -> _ getCustomActionListOptions (),
];
$ this-> buttonList-> add (& # 39; add_new & # 39 ;, $ addButtonProps);

parent returned :: _ prepareLayout ();
}

/ **
* Recovery options for the division button & # 39; CustomActionList & # 39;
*
* @return array
* /
Protected function _getCustomActionListOptions ()
{
/ * List of buttons you want to add * /
$ splitButtonOptions =[
        'action_1'=>['label'=>__('Action 1'),'onclick'=>'setLocation("ACTION CONTROLLER")'],
& # 39; action_2 & # 39; =>['label'=>__('Action 2'),'onclick'=>'setLocation("ACTION CONTROLLER")'],
& # 39; action_3 & # 39; =>['label'=>__('Action 3'),'onclick'=>'setLocation("ACTION CONTROLLER")']
        ];
/ * in the previous list you can also pass other button attributes * /
returns $ splitButtonOptions;
}
}

Now we call this block file on the design page where we want to add this division button: