The "advanced page location" is a key concept here. While you can very easily target named elements using a page location input widget, Portlet Factory supports a very powerful page location language which you can use to select just about anything on a page. In the case of a typical Portlet Factory table, generated using page automation from the gridtable template, it should be easy to use an XPath page location modifier to "walk up" two levels from a named element to its parent TR. Here's one way to do this: select a column value using the standard page location picker. Then switch the "location technique" to "advanced". Now the current page location will be shown: add "XPath ../.." to the string, e.g. "Page page1 NameSearch ORDERID XPath ../.."
The "Locating control builder calls on pages" help topic includes more information on what can be done with the page location language.