3

我有一个大网格,有很多行和很多窄列。我想通过以与突出显示当前行相同的方式突出显示当前列来更容易地查看选择了哪一列。

我尝试使用该GetContentStyle事件,但似乎只有选定的行被重新绘制,所以它并没有那么好......

有谁知道如何突出显示 ExpressQuantumGrid 中的选定列?

4

1 回答 1

1

我最终得到的解决方案是在焦点在列之间移动时强制重新绘制。这不是我喜欢的解决方案......至少它应该能够仅使相关列无效......

procedure TForm1.gridViewStylesGetContentStyle(
  Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord;
  AItem: TcxCustomGridTableItem; var AStyle: TcxStyle);
begin
  if (AItem is TcxGridBandedColumn) and
     (Sender.Controller.FocusedItem = AItem) then
  begin
    AStyle := DataManager.cxStyleSelected
  end;
end;

procedure TForm1.gridViewByGoalFocusedItemChanged(
  Sender: TcxCustomGridTableView; APrevFocusedItem,
  AFocusedItem: TcxCustomGridTableItem);
begin
  Sender.Invalidate(true);
end;
于 2014-05-13T21:23:41.480 回答