how to get row id or row index on click of add row button


I have a content provider - adding rows to it , using - Add Row Button .

I have fixed the first row in the intialize method using - getItemLinesProvider().createRow();

I get the row index using - log(“…”+getItemLinesProvider().getRowIndex());

but i want to achieve this for each row added on click of the Add Row Button

there is no on click event for add row button…how can i achieve it …i tried with a custom async button , but it refreshes each row …so i loose the data …

Please suggest .

Jasmeen Kaur