views:

20

answers:

1

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?

A: 

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