Version

Disabling a WinGrid Column

If your WinGrid™ contains columns of information that must not be modified, or don’t apply in a specific situation, you can disable those columns by setting the CellActivation property off the Column object to Activation.Disabled. The Activation enumeration also contains other useful activation-specific settings which apply to each cell included in the given column.

The following code disables all the cells in the first column of the first band in a WinGrid control. When disabled, each cell in the column will display it’s text as grayed out (unless an individual cell’s activation is modified), similar to the screenshot above. This topic assumes that you have a WinGrid control on your form with at least one band. For more information on data binding the WinGrid control, see Bind WinGrid to a Flat Data Source.

disable a ultragrid column

In Visual Basic:

Me.UltraGrid1.DisplayLayout.Bands(0).Columns(0).CellActivation = _
  Infragistics.Win.UltraWinGrid.Activation.Disabled

In C#:

this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation =
  Infragistics.Win.UltraWinGrid.Activation.Disabled;