Using: Delphi XE, Devexpress VCL.
In the cell click event, I am trying to change the value of a cell in a hyperlink column in Devexpress's QuantumGrid VCL control. The column is a custom column and is not bound to the dataset.
The hyperlink column's properties are set as per:
Editing := False;
ReadOnly := True;
SingleClick := True;
The following code (grdReprint is the grid's DBTableView, and, grdReprintColumn2 is the Hyperlink column) is ineffective:
procedure TfReceiptList.grdReprintCellClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: boolean);
var
v: integer;
c: integer;
begin
if ACellViewInfo.Item = grdReprintColumn1 then
begin
v := datamod.uspRECEIPT_LSTRECEIPTID.AsInteger;
fMain.PrintReceipt(v);
end
else if ACellViewInfo.Item = grdReprintColumn2 then
begin
(* This code is ineffective because the cell contents do not change *)
if ACellViewInfo.Text = 'Void' then
grdReprint.DataController.SetEditValue(grdReprintColumn2.Index, 'Unvoid', evsValue)
else
grdReprint.DataController.SetEditValue(grdReprintColumn2.Index, 'Void', evsValue);
end;
end;
If the above isn't the proper way to change the text in the cell, then other ideas are welcome.
TIA.