asp.net - RadGrid 中过滤后的行数

标签 asp.net telerik telerik-grid

当结果网格有多个页面时,如何在过滤后获取 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/

相关文章:

javascript - 如何将 C# 函数中的字符串添加到元标记(引号内)?

asp.net-mvc - 带有动态列的 telerik 网格绑定(bind)

c# - GridView 验证将整行标记为无效,而不仅仅是单元格

c# - kendo Grid 中的可空枚举属性

asp.net-mvc - 客户端模板 Telerik MVC 网格的 ActionLink 问题

asp.net - ASP.Net 中的 WF 和并行性需要指导

c# - CustomValidator 未在控制中触发

asp.net - 如何在使用母版页时解析 css 样式表中的图像路径

asp.net - 为 radcalendar 动态应用 css

javascript - 如何更改 Kendo Chart 的背景图片?