how to get the rowid

i have a table with add and remove buttons .

in one of the columns of this table , i have a lookup button that opens a modal dialog box showing some data and user can select that data - which i want to populate in the table row .

i have been able to achieve this if it is a static field , but for dynamic add and remove rows i am not able to pass id

please suggest .

Regards
Jasmeen Kaur