Make an WinGrid Cell Containing an WinTextEditor Read-Only

Jason Beres [Infragistics] / Saturday, February 28, 2009

If the WinTextEditor is set to the EditorControl of a single cell, in order to make it read- only the cell’s Activation property needs to be set to “ActivateOnly.”

The following code and samples assume the WinTextEditor is the EditorControl of an entire column in the WinGrid.


private void ultraGrid1_InitializeLayout(object sender, 
    Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
    e.Layout.Bands[0].Columns[0].EditorControl =this.ultraTextEditor1;
    e.Layout.Bands[0].Columns[0].CellActivation =Activation.ActivateOnly;


Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, _
   ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles 

        e.Layout.Bands(0).Columns(0).EditorControl = Me.UltraTextEditor1
        e.Layout.Bands(0).Columns(0).CellActivation = Activation.ActivateOnly
End Sub