$.udb(ds).isFirstRecordDefaultSelected()
note
This article is about the isFirstRecordDefaultSelected() function of the DataSourceContainer object.
$.udb(ds).isFirstRecordDefaultSelected()
Detects whether the 'Set First Record as Default Selected Record' property is turned on for the first data source in the container. If this property is turned on (the default), the first record queried becomes the default selected, or current, record. Related data sources can only synchronize with the data source if it has a current record.
Returns a boolean.
Syntax
$.udb( *ds* ).isFirstRecordDefaultSelected()
The required ds is a data source selector.
Example
$.udb('EMP').executeQuery().then((dsc) => {
// if no record is selected automatically, related data sources won't
// synchronize until one is, so select the first record ourselves
if (!dsc.isFirstRecordDefaultSelected() && dsc.rowCount() > 0) {
dsc.rows(0).select();
}
});