开发者

How to disable the Footer summary for certain columns?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜