GrapeCity.Win.MultiRow Namespace : CellStyleNotify Class |
<ToolboxBitmapAttribute()> <DefaultPropertyAttribute("InvalidCellStyle")> Public Class CellStyleNotify Inherits AppearanceActionBase Implements INamedObject
Dim instance As CellStyleNotify
[ToolboxBitmap()] [DefaultProperty("InvalidCellStyle")] public class CellStyleNotify : AppearanceActionBase, INamedObject
Only properties that do not have an inherited value can affect the appearance when the action is executed.
The InvalidCellStyle property setting does not affect the cell's Style property value.
void setPairCharValidator_Click(object sender, EventArgs e) { Template template = Template.CreateGridTemplate(1); PairCharValidator pairCharValidator = new PairCharValidator(); pairCharValidator.PairChars.Add(new PairChar('(', ')')); CellStyleNotify cellStyleNotify = new CellStyleNotify(); cellStyleNotify.InvalidCellStyle.ForeColor = Color.Red; cellStyleNotify.InvalidCellStyle.Font = new Font(DefaultFont, FontStyle.Bold); cellStyleNotify.DoActionReason = ValidateReasons.EditedFormattedValueChanged; pairCharValidator.Actions.Add(cellStyleNotify); template.Row.Cells[0].Validators.Add(pairCharValidator); this.gcMultiRow1.Template = template; label.Text = "The PairCharValidator.PairChars is '( )', in edit mode, if you input '2*(3+4' to trigger validation, validation fails, the font changes, if input '2*(3+4)' to trigger validation, the validation succeeds."; }
Private Sub setPairCharValidator_Click(ByVal sender As Object, ByVal e As EventArgs) Handles setPairCharValidator.Click Dim template As Template = template.CreateGridTemplate(1) Dim pairCharValidator As New PairCharValidator() pairCharValidator.PairChars.Add(New PairChar("("c, ")"c)) Dim cellStyleNotify As New CellStyleNotify() cellStyleNotify.InvalidCellStyle.ForeColor = Color.Red cellStyleNotify.InvalidCellStyle.Font = New Font(DefaultFont, FontStyle.Bold) cellStyleNotify.DoActionReason = ValidateReasons.EditedFormattedValueChanged pairCharValidator.Actions.Add(cellStyleNotify) template.Row.Cells(0).Validators.Add(pairCharValidator) Me.gcMultiRow1.Template = template label.Text = "The PairCharValidator.PairChars is '( )', in edit mode, if you input '2*(3+4' to trigger validation, validation fails, the font is changed, if input '2*(3+4)' to trigger validation, the validation succeeds." End Sub
System.Object
GrapeCity.Win.MultiRow.CellValidateAction
GrapeCity.Win.MultiRow.AppearanceActionBase
GrapeCity.Win.MultiRow.CellStyleNotify
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2