Working on a MOSS component, I implemented a Modal Popup form including a SPGridView with Sorting an Filtering features. unfortunately, I spent "huge" amount of time figuring-out how to make the grid working properly with its PostBack events. The main issue was every javascript call resulted in the opening of a new form...
I found a bunch of posts regarding this, and the main advice was to avoid using the showModalDialog for non-static content. Just use the window.open()...
I finally found this post. The result was to add the following line to the <head> tag of my popup form:
<base target="_self"/>
With this all my javascript code and PostBack events work like a charm!