2

Currently I'm developing an application with devexpress, and I had set two columns to hide like this:

gridView1.Columns[2].Visible = false;

However, when I run my program, there is an option from the DataGrid called "Selector de Columnas" (in English ColumnChooser). In this option the two columns that I set to be hidden are shown. I don't want the user to see these columns but I still need them, so I just want to hide them.

You can see the problem here

I searched in the online documentation from Devexpress and they state here that columns can be hidden with the ShowInColumnChooser property. However I'm not able to hide these columns in the ColumnChooser. They don't show you any example, just this line of code:

public bool ShowInColumnChooser { get; set; }

I guess this is a property from some Devexpress control, however they don't state how to use it.

2 Answers 2

7

All the links you referred to are related to the WPF DXGrid, but as far as I can see from your screenshot, you are working with the XtraGrid (WinForms). If so, you should use the OptionsColumn.ShowInCustomizationForm property as follows:

column1.OptionsColumn.ShowInCustomizationForm = false;

Related help articles:
Column and Card Field Overview
Customization Form

1

If you want to prevent a specific column from being showed/hidden, set the column's properties OptionsColumn.ShowInCustomizationForm and OptionsColumn.AllowShowHide to false.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.