Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
655
Cell.Activation and Column.CellActivation
posted

Hello
I have a grid with diferent cell activation situations.
Some columns has cellactivation = NoEdit but only for the preload data.
The added cells allow edition.
I use the .IgnoreRowColActivation for allow the cell edition.
I wonder if is possible to know if a cell is editable or not, just watching the cell properties.

I.E.

        dt = New DataTable
        dt.Columns.Add("NAME", System.Type.GetType("System.String"))
        dt.Columns.Add("NUMBER", System.Type.GetType("System.String"))
 
 
        dt.Rows.Add("One""1")
        dt.Rows.Add("Two""2")
        dt.Rows.Add("Three""3")
        dt.Rows.Add("Four""4")
        dt.Rows.Add("Five""5")
 
        bandera = False
 
        With ug1
            .DataSource = dt
 
            'COLUMN NOEDIT
            .DisplayLayout.Bands(0).Columns(0).CellAppearance.BackColor = Color.LightGray
            .DisplayLayout.Bands(0).Columns(0).CellActivation = UltraWinGrid.Activation.NoEdit
 
 
            'NEW ROW
            Dim oRow As UltraWinGrid.UltraGridRow = ug1.DisplayLayout.Bands(0).AddNew()
            'Override the Activaction
            oRow.Cells(0).IgnoreRowColActivation = True
            oRow.Cells(0).Activation = UltraWinGrid.Activation.AllowEdit
            oRow.Cells(0).Appearance.BackColor = Color.LightSalmon
 
 
            oRow.Cells(1).IgnoreRowColActivation = True
            oRow.Cells(1).Activation = UltraWinGrid.Activation.AllowEdit
            oRow.Cells(1).Appearance.BackColor = Color.LightSalmon
 
        End With

 

In the 1st pic I check a preload cell (not editable) and in 2nd i check a new row's cell. Has the same values properties but the 2nd one is editable.