dataSource.Record Class
Class representing a record in dataSource.Collection Instances of this class are created from getRecord When you update a record
Methods
setProperties
(
dataSource.Record | Undefined
-
properties
Update multiple properties
Parameters:
-
properties
Object
Returns:
dataSource.Record | Undefined:
Example:
var collection = new ludo.dataSource.Collection({ idField:'id' }); collection.getRecord(100).setProperties({ country:'Norway', capital:'Oslo' }); will set country to "Norway" and capital to "Oslo" for record where "id" is equal to 100. If you're not sure that the record exists, you should use code like this:
var rec = collection.getRecord(100); if(rec)rec.setProperties({ country:'Norway', capital:'Oslo' });