Hi.
I am trying to count the number of records in a paged grid from client side. I can't see in the documentation this method for the GridTableView.
If the number of records is less than the pageSize, then I can use get_dataItems().length to find the number of rows, but that is too slow. Shouldn't there be a quicker way ?
This is the code I have now:
I am trying to count the number of records in a paged grid from client side. I can't see in the documentation this method for the GridTableView.
If the number of records is less than the pageSize, then I can use get_dataItems().length to find the number of rows, but that is too slow. Shouldn't there be a quicker way ?
This is the code I have now:
var masterTableView = $find(clientID).get_masterTableView(); |
if (masterTableView != null) { |
var dataItems = masterTableView.get_dataItems(); |
var pageCount = parseInt(masterTableView.get_pageCount()); |
var pageSize = parseInt(masterTableView.get_pageSize()); |
if (pageCount > 1) { |
return dataItems.length |
} else { |
return dataItems.length; |
} |
} |