Useage of onRowClick not clear



I have a table, once cliked on the row I’d like to delete coresponding database entry and reload the view.

$t_activ->onRowClick(function ($f) use ($t_activ,$cuid,$m,$uid) {

The problem is that loading clicked value by f->jsRow()->data(‘id’); is not doing a trick, any advice how to pull the clicked ow id into this function ?

Thanks and Regards


Fourth argument to “on” allow to pass arguments to a callback from JS. Something like this:

                $table->on('click', 'tr', function($j, $id) use($bl, $v){

                    return 'Clicked '.$id;

                }, [(new \atk4\ui\jQuery())->data('id')]);


Thank you Sir, worked perfectly! :slight_smile: