如何禁用某些列的页脚摘要?

发布于 2024-08-29 16:45:21 字数 112 浏览 2 评论 0原文

我正在使用 devexpress 网格,并且我不想为字符串列提供任何页脚或组摘要。用户可以通过访问页脚菜单来修改用于页脚摘要的公式。我希望对字符串列禁用此菜单,因为提供的摘要对于字符串列没有意义。有什么想法吗?

I am using a devexpress grid and i don't want to have any footer or group summary for string columns. The user can modify the formula used for the footer summary by accessing the footer menu. I want this menu to be disabled for string columns, since the provided summaries do not make sense for string columns. Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒儿 2024-09-05 16:45:21

对于所有对该解决方案感兴趣的人:
处理网格的ShowGridMenu事件:

private void MainView_ShowGridMenu(object sender, GridMenuEventArgs e)
{
    Column col;
    if (e.MenuType == GridMenuType.Summary && e.HitInfo.Column != null && e.HitInfo.Column.ColumnType == typeof(string))
    {
        e.Allow = false
    }
}

For all those interested in the solution:
Handle the ShowGridMenu event of the grid:

private void MainView_ShowGridMenu(object sender, GridMenuEventArgs e)
{
    Column col;
    if (e.MenuType == GridMenuType.Summary && e.HitInfo.Column != null && e.HitInfo.Column.ColumnType == typeof(string))
    {
        e.Allow = false
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文