This is a migrated thread and some comments may be shown as answers.

[Solved] Rowcount clientside

2 Answers 148 Views
Grid
This is a migrated thread and some comments may be shown as answers.
topry
Top achievements
Rank 1
topry asked on 13 May 2009, 06:30 PM
What clientside object/property will return the current number of rows loaded/displayed within a grid?

Querying the mastertableviews .rowcount property always returns the max potential rows, vs how many are actually in the grid on the current page. For example, if I have RowCount set to 5, and 11 records in the dataset, then pages 1 and 2 would return 5, but when page 3 is loaded it shouild return 1.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 14 May 2009, 04:17 AM
Hi Topry,

Try the following client side code for getting the number of rows currently displayed in grid.

JavaScript:
 
<script type="text/javascript"
function getRowcount() 
    var count = $find("RadGrid1").get_masterTableView().get_dataItems().length;     
    alert(count); 
</script> 

Thanks,
Shinu.
0
topry
Top achievements
Rank 1
answered on 14 May 2009, 06:38 PM
Thank you very much!
Tags
Grid
Asked by
topry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
topry
Top achievements
Rank 1
Share this question
or