How can i use imageButtonCommand dynamic

I have this problem:
I have a Datagrid AA with 1 templatecolumn, inside this i have a imagebutton, but i can use oncommand event. how can i use it?

Loader.
Up arrow icon