OnCanEdit event with CheckBox

Hi

I am using tAdvColumnGrid with one the column contains checkbox throughout edDataCheckBox editor property.
According some parameter, the cell contained this checkbox can be editable or not. Whatever the CanEdit value, the checkbox remains editable, but the behaviour of this cell is correct when I used an other editor property like edNormal.

How can I correct that ?

regards
olivier

In TAdvColumnGrid, editing
is controlled per column via grid.Columns[colindex].ReadOnly: boolean;

I am talking about the behaviour of a specific cell (checkbox) in a column and not the behaviour of the column itself.
I forget to tell you, I used the OnCanEditCell event to define this behavior

I have retested this here with a default TAdvColumnGrid on the form initialized with:


procedure TForm1.AdvColumnGrid1CanEditCell(Sender: TObject; ARow, ACol: Integer;
  var CanEdit: Boolean);
begin
  CanEdit := odd(arow);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  AdvColumnGrid1.Columns[1].ReadOnly := false;
  AdvColumnGrid1.Columns[1].Editor := edDataCheckbox;
end;

and checkboxes on odd rows can be edited, those on even rows not.
So, I cannot reproduce an issue with the functionality of the OnCanEditCell event.

Thanks for your answer,
but the problem remains.
I just send you a project for demonstration
regards
olivier

You did set grid.ControlLook.CheckAlwaysActive = true, hence, it is always enabled.

Thanks
And sorry to bother you :(
olivier
PS : I send you last Sunday a post including a project. I am not sure to include it in fact. did you reveive it ?