You can get the count of the number of records of the form’ s datasource shown on the form’s grid after the form is opened by the method numberOfRowsLoaded() on the form’s datasource:
I think this is the simplest way to get Selected row count, but this will lead to TWO FOR loops in code, one specially to get Selected row count & another for logic purpose!!
I think there should be some another way to reach at Selected row count…!
I think there is no other way to do that , as fabrico suggested. Rather than using the same loop for two times use a map and insert the recid into that, so that you can even implement the remaining business logic in a class by using that map.
I want to show progress bar while processing items, so to set progressbar count i need how many number of rows user has selected!
no i am not facing any bottlenecks in code execution but as good programming there should be one loop only to process items & any how we shuold get Selected Row count directly.!