当结果网格有多个页面时,如何在过滤后获取 RadGrid 的行数。
radGrid.MasterTableView.Items.Count
在本例中返回页面大小。
最佳答案
请尝试使用以下代码片段。
private int totalItemCount;
protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
if (e.EventInfo is GridInitializePagerItem)
{
totalItemCount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
}
}
关于asp.net - RadGrid 中过滤后的行数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11018581/