A grid has no row set.
This is indeed true and I should apologise for lack of precision. At risk of further confusion I should explain that my comment reflected the [MRI] finding that the object "
com.sun.star.comp.forms.OGridControlModel" does somewhat surprisingly have a "RowSet" property so that no error is necessarily raised by:
The ElementNames property of the "
OGridControlModel" object comprise the names of the columns of the Grid form control. Calling its "RowSet" property however supplies the "
com.sun.star.comp.forms.ODatabaseForm" object: i.e., the container of the Grid form control. While the ElementNames and the Count properties of this "ODatabaseForm" object refer to the various Controls that it contains, it does have a RowCount property and the customary .row methods. Thus the RowSet property of the Grid does appear in effect to give access to its containing (data)form's row set.
I would endorse however Villeroy suggestion: the RowSet can be reached just as easily, and indeed more logically, through the Parent property of the Grid form control.
When this issue has been resolved, it would help other users of the forum if you add the word - [Solved] - to the Subject line of your 1st post (edit button top right).
AOOo 4.1.5 & LO 6 on MS Windows 10 MySQL and HSQLDB