You can either dig into the data source object to find the data and grab the length, or you can set the data as a component property and refer to this:
this.someObjectsArray = someObjectsArray;
someObjectsDs = ds.cloneWithRows(this.someObjectsArray);
Now you can do it this.someObjectsArray.length, just be sure to update this variable anytime you update the data source.
source
share