Version

Disabling a WinGrid Row

If a certain record in your database doesn’t apply in a specific situation, or you need to keep your end users from modifying the data within that record, you can disable the Row that contains that record by setting its Activation property to Activation.Disabled. The Activation enumeration also contains other useful activation-specific settings which apply to each cell included in the given row.

The following code disables all the cells in the first row of the WinGrid™ control. When disabled, each cell in the row 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 row

In Visual Basic:

Me.UltraGrid1.DisplayLayout.Rows(0).Activation = _
  Infragistics.Win.UltraWinGrid.Activation.Disabled

In C#:

this.ultraGrid1.DisplayLayout.Rows[0].Activation =
  Infragistics.Win.UltraWinGrid.Activation.Disabled;