On button click add new row on index base location

Hi All,

I am trying to add new row in table on index basis but it always add row on first index. Can any one help me.

Thanks for help.