Is the button inside the repeating section? If so, then you already have a reference to the row you are on when you click the button, and you can use SelectNodes to select the row, and then do you insert.
If the button is outside, you'll need some way of knowing what the current row is. You might be able to use OnContextChange to keep track of that.
You'll need to play around a little to see what works.
--
Greg Collins [InfoPath MVP]
Please visit:
http://www.InfoPathDev.com
how do you add a button that cause a repeating section to be instered below
the current section?