private void OnCustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) { if (e.RowSelectionState == SelectionState.None) { object result = e.ConditionalValue; if (e.Property == TextBlock.BackgroundProperty) { int n = e.RowHandle / 3; if (n % 2 == 0) { result = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FAFCFC")); } } if (e.Property == TextBlock.ForegroundProperty) { if (e.Column != null && e.Column.FieldName != "replenishmentInstruction" && e.Column.FieldName != "sentDate" && e.Column.FieldName != "valueDate" && e.Column.FieldName != "memberBankName" && e.Column.FieldName != "pml") { if ((e.RowHandle + 1) % 3 == 0) { result = Brushes.Red; } } } e.Result = result; e.Handled = true; } }
private void TableView_CustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) { if (e.RowSelectionState != SelectionState.None) { e.Result = e.ConditionalValue; e.Handled = true; } }
private void OnCustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) { object row = treeList.GetRow(e.RowHandle); if (row != null && ((Domain.Measure)row).IsDefault) { bool isForeground = e.Property != null && e.Property.Name == "Foreground"; bool isBackground = e.Property != null && e.Property.Name == "Background"; if (isForeground) { e.Result = Brushes.Red; } e.Handled = true; } }
void gridControl_CustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) { e.ResultFormat.Foreground = e.CellConditionalFormat?.Foreground ?? e.RowConditionalFormat?.Foreground ?? e.ResultFormat.Foreground; }
private void viewAccountTax_CustomCellAppearance(object sender, CustomCellAppearanceEventArgs e) { e.Result = e.ConditionalValue; e.Handled = true; }