GrapeCity MultiRow Windows Forms Documentation
DynamicCellStyle Class
Members  Example 


Represents a special CellStyle that is used to customize a CellStyle under the DynamicCellStyleContext class.
Syntax
Public Class DynamicCellStyle 
   Inherits CellStyle
Dim instance As DynamicCellStyle
public class DynamicCellStyle : CellStyle 
Remarks
This DynamicCellStyle allows you to customize a CellStyle dynamically. You can attach a ConditionHandler event handling method, and return a CellStyle with the given DynamicCellStyleContext.
Example
The following code example shows how to implement the "NewRowDefaultCellStyle". You can set a DynamicCellStyle to Row.DefaultCellStyle, and return a cell style when the painted row is a new row.
{
    public class DynamicCellStyleDemo : Form
    {
        private GcMultiRow gcMultiRow1 = new GcMultiRow();

        public DynamicCellStyleDemo()
        {
            this.gcMultiRow1.Dock = DockStyle.Fill;
            this.Controls.Add(this.gcMultiRow1);
            this.Load += new EventHandler(Form1_Load);
            this.Text = "DynamicCellStyle Demo (If any cell's value is not empty, color will change)";
            this.Size = new Size(700, 400);
        }
Public Class DynamicCellStyleDemo
    Inherits Form
    Private gcMultiRow1 As New GcMultiRow()

    Public Sub New()
        Me.gcMultiRow1.Dock = DockStyle.Fill
        Me.Controls.Add(Me.gcMultiRow1)
        Me.Text = "DynamicCellStyle Demo (If any cell's value is not empty, color will change)"
        Me.Size = New Size(700, 400)
    End Sub
Inheritance Hierarchy

System.Object
   GrapeCity.Win.MultiRow.CellStyle
      GrapeCity.Win.MultiRow.DynamicCellStyle

Requirements

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

See Also

Reference

DynamicCellStyle Members
GrapeCity.Win.MultiRow Namespace
CellStyle Class
DynamicCellStyleConditionHandler Delegate
DynamicCellStyleContext Class
NamedCellStyle Class
ConditionalCellStyle Class
CombinedCellStyle Class

 

 


Copyright © GrapeCity, inc. All rights reserved.