I sent the same question as a support request to DevExpress, and I got this answer:
"Hello Svein.
Thank you for your message. You can achieve the desired result using the GridView's OnMouseDown event handler and checking the hit information there.
Attached is an example that shows how to perform this task. Please try this solution, and let us know your results."
The test project had a simple grid with a checkbox column. The GridView's OnMouseUp-event had the following code:
procedure TForm1.cxGrid1TableView1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
AHitTest: TcxCustomGridHitTest;
ACellViewInfo: TcxGridDataCellViewInfo;
AEditViewInfo: TcxCustomCheckBoxViewInfo;
ARect: Trect;
AValue: Variant;
begin
AHitTest := TcxGridSite(Sender).GridView.GetHitTest(X, Y);
if AHitTest is TcxGridRecordCellHitTest then
begin
ACellViewInfo := TcxGridRecordCellHitTest(AHitTest).ViewInfo as TcxGridDataCellViewInfo;
if ACellViewInfo.EditViewInfo is TcxCustomCheckBoxViewInfo then
begin
AEditViewInfo := TcxCustomCheckBoxViewInfo(ACellViewInfo.EditViewInfo);
ARect := AEditViewInfo.CheckBoxRect;
if PtInRect(ARect, Point(X, Y)) then
begin
AValue := ACellViewInfo.GridRecord.Values[ACellViewInfo.Item.Index];
TcxGridTableView(TcxGridSite(Sender).GridView).DataController.SetEditValue(
ACellViewInfo.Item.Index, AValue = false, evsValue);
end;
end;
end;
end;
Unfortunately, since the MouseUp-event was on the grid, rather than the column, I can't make a repository-item for my checkbox-columns, but at least now I know a way to do it.