Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Getting ItemChecked property
The ItemChecked property uses Record as a way to get the data.
I have a view by group, which is collapsed, and I expand one group.
Then set the check box to ON for all items in that group.
Then close that group, and open another group.
The OLE.List property only returns the current visible expanded group, and not all data in the table.. which confused me.
The RecordList and variants don't show the Checked property within the returned table.
I then used the Recordlist to get the number of rows, and for/next look for the row to get the checked property
Recover=Get_Property(OLE_TABLE_ADD,"OLE.ItemChecked[1;":Row:"]")#
This does not return the expected results, due to (I believe) the collapsed nature of the view.
So, what I am after is the best way to get the ItemChecked property, regardless of whether the view is collapsed etc.
Thanks
Colin
I have a view by group, which is collapsed, and I expand one group.
Then set the check box to ON for all items in that group.
Then close that group, and open another group.
The OLE.List property only returns the current visible expanded group, and not all data in the table.. which confused me.
The RecordList and variants don't show the Checked property within the returned table.
I then used the Recordlist to get the number of rows, and for/next look for the row to get the checked property
Recover=Get_Property(OLE_TABLE_ADD,"OLE.ItemChecked[1;":Row:"]")#
This does not return the expected results, due to (I believe) the collapsed nature of the view.
So, what I am after is the best way to get the ItemChecked property, regardless of whether the view is collapsed etc.
Thanks
Colin
Comments
If you have a row index and want it's record index, use RowToRecord. There is also a RecordToRow method if you need to map the other direction. So, if you want the checked state of row 2, then you'd do this:
Record = Send_Message(@Window:".OLE_REPORTTABLE", "OLE.RowToRecord", 2) IsChecked = Send_Message(@Window:".OLE_REPORTTABLE", "OLE.ItemChecked[1;":Record:"]")
As you discovered, the various List properties deal with rows, whereas the RecordList property deals with records. You said the checked values were not appearing in the RecordList. Did you set the checkbox to be the data source for that column? (See ColumnDataSource)I keep looking to the Properties, and could not figure out how to do it.
Then realised what you mentioned here is a SEND_MESSAGE, confused me totally, as I was expecting that the Row for a Record and vice-versa would be a property.
Clarity afterwards is a great thing.
Sorry for your time, but hopefully others looking to this will also find the same post for the solution, and even me in a few months when I forget again.
Colin