I put the following code in the RadGrid1_PageIndexChanged event:
Unfortunately, it looks like this doesn't do a full postback and the label doesn't end up getting updated. How can I go about doing this? I tried doing it client side and had problems with this, too. It says $find is undefined.
if
((e.NewPageIndex + 1) == rgResults.PageCount)
{
showingRowsTo = GridSource.Tables[0].Rows.Count;
}
else
{
showingRowsTo = (e.NewPageIndex + 1) * rgResults.PageSize;
}
string
rowCount =
string
.Format("Displaying {0}-{1} of {2}", showingRowsFrom, showingRowsTo, GridSource.Tables[0].Rows.Count);
lblResultsCountBottom.Text = lblResultsCountTop.Text = rowCount;
Unfortunately, it looks like this doesn't do a full postback and the label doesn't end up getting updated. How can I go about doing this? I tried doing it client side and had problems with this, too. It says $find is undefined.
$(document).ready(
function
() {
var
grid = $find(
"<%=rgResults.ClientID%>"
);
var
mtv = grid.get_masterTableView();
var
pageIndex = mtv.get_currentPageIndex();
alert(pageIndex);
});