Pass value to a Modal Dialog

Hello,
how is it possible to pass a value(s) from a table to a modal dialog? I just want to give some more details in the dialog box. Any ideas, demo etc?

Best Regards