Delete row dynamically from table layout in android

I am having a

TableLayout

for which I added rows dynamically. In each of the row there are 2 elements of which one is

TextView

other is

Button

. When I click the button that is present in a row, that row should be deleted. How can this be done in Android ? How to find rowid and how to delete a row dynamically. Can anyone help me in sorting out this issue.