[Solved] Select A Row in a Grid Control in a Macro
Posted: Wed Oct 28, 2009 7:35 am
I have a need to programmatically select a row in a grid control in oobase 3.1.1. I need to actually select the whole row so it is highlighted, not just move the cursor through the records in the underlying result set. Any help would be vastly appreciated. I see there is a .select method, for the grid view controller, but cannot figure out what object it wants (see below).
select
boolean
select( [in] any xSelection )
raises( ::com::sun:
:lang::IllegalArgumentException );
Description
selects the object represented by xSelection if it is known and selectable in this object.
In other words, what is the form for the argument for the select method of com.sun.star.form.FmXGridControl?
After a lot of research, using xray and debugging, I think select should be looking for just the row number of the record, a long.
However, doing so throws an illegal argument exception, see below. I'm beginning to think it just doesn't work...
Thanks for reading!
select
boolean
select( [in] any xSelection )
raises( ::com::sun:
Description
selects the object represented by xSelection if it is known and selectable in this object.
In other words, what is the form for the argument for the select method of com.sun.star.form.FmXGridControl?
After a lot of research, using xray and debugging, I think select should be looking for just the row number of the record, a long.
However, doing so throws an illegal argument exception, see below. I'm beginning to think it just doesn't work...
Thanks for reading!