TDBAdvGrid, goEditing automatic on checkbox click


I add a boolean column in my grid and I set the property "ShowBooleanFields" to true.

I cannot edit my grid, because the option "goEditing" is set to false. The problem is when I click in the boolean column (checkbox), the grid is now editable (option "goEditing" is now to true) but I don't want to edit.

Is there an option that I have to check ?

Thanks for your help

Did you try to set

grid.ControlLook.CheckAlwaysActive = true?

This option was set to False, but I just try to set it True and the problem is still there

Did you set for all columns except the boolean column that grid.Columns[x].ReadOnly  = true?

No my columns are not ReadOnly

You requested that your other columns should not be editable, hence  I suggested to configure these grid columns as readonly.

I understand your solution, but this is not what I need.

When I open my form, the grid property "Options.goEditing = False" and this is what I want. The grid cannot be edit until the user click on the "Modify" button. Once the user click on that button, the grid property "Options.goEditing = True" and the grid is editable.

The problem is when the user click on the "checkbox" in the grid, the checkbox state change and the grid is now "Options.goEditing = True", I want to understand why the grid changes itself ? 

Thank you Bruno

If you use grid.Columns[x].ReadOnly, it should keep the column as readonly.

If you want to switch between editing and not editing, I recommend to do this per column with grid.Columns[x].ReadOnly

Good morning April,

i don't work with dbgrid but try this way (if it is possible with db version of the grid).

The grid has oncaneditcell event.

You can do something like

if Acol<>Colwithcheckbox then allow:=false

in this way only the rigth column can be edited or checkd.

I use this way (maybe ther's better way ....) and i have no problem (but in TAdvStringGrid)



Hi Daniele,

Thanks for your answer, it works fine for me too.

Have a great day.