dgNumberOfRecords
get the dgNumberOfRecords
set the dgNumberOfRecords of group "DataGrid" to 20
Getting the dgNumberOfRecords is the same as getting the dgNumberOfLines.
Setting the dgNumberOfRecords has a special significance however. If you set
the dgNumberOfRecords then you are telling the data grid that you know how many
total records there are and you are going to supply the data for each record on
an as-needed basis. This is useful when you have data in a database cursor that
you would like to feed into the data grid.
row height
- For tables and forms whose 'fixed row height' property is true this
represents the height that your rows will be drawn at. If this property is not
set for a form whose 'fixed control height' is true then the record template
group height is used. For forms whose 'fixed control height' is false this
represents the height that alternating rows that contain no data will be drawn
at.
So something like:
put the dgNumberOfRecords of group "DataGrid" into tNumberOfRecords
put the dgProp ["row height"] of group "DataGrid" into tRowHeight
Set the height of group "DataGrid" to min(12, tNumberOfRecords) * (tRowHeight)
+ 36 -- account for header and scrollbar
Bob S
http://lessons.livecode.com/m/datagrid/l/7343-data-grid-properties
http://lessons.livecode.com/m/datagrid/l/7344-data-grid-api
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode