开发者

How to disable the Footer summary for certain columns?

开发者 https://www.devze.com 2022-12-28 04:20 出处:网络
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 acc开发者_C百科essing the footer m

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 acc开发者_C百科essing 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?


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
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消