作成日: 2023/01/18 最終更新日: 2023/04/26
文書種別
不具合
状況
修正済み
詳細
以下の条件を満たすとき、列を選択すると、選択セルの前景色は列の前景色ではなくグリッドの前景色で描画されます。
- GridのSelectionForegroundプロパティを設定していない(既定値のままにする)
- ColumnのForegroundプロパティを設定している
回避方法
この問題は2023J v1(4.6.20231.784)で修正されました。
※修正版を適用しない場合の回避方法は以下のとおりです
CellFactoryのApplyCellStylesメソッドを使用して、選択セルの前景色を調整します。
◎サンプルコード(C#)
public override void ApplyCellStyles(C1FlexGrid grid, CellType cellType, CellRange rng, Border bdr)
{
base.ApplyCellStyles(grid, cellType, rng, bdr);
if (cellType == CellType.Cell && grid.SelectionForeground == null)
(bdr.Child as TextBlock).Foreground = grid.Columns[rng.Column].Foreground;
}