Class GridProperties
Implements the functionalities that holds various options that let you customize the appearance of the grid, such as window background, grid line colors, printer / page settings, and more.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridProperties : Disposable, IDisposable, ISerializable
Constructors
GridProperties()
Initializes a new instance of GridProperties class.
Declaration
public GridProperties()
GridProperties(SerializationInfo, StreamingContext)
Initializes a new instance of GridProperties from a serialization stream.
Declaration
protected GridProperties(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | An object that holds all the data needed to serialize or de-serialize this instance. |
| System.Runtime.Serialization.StreamingContext | context | Describes the source and destination of the serialized stream specified by info. |
Properties
AllowHiddenCellFloating
Gets or sets the values to enable floating over hidden cells
Declaration
public bool AllowHiddenCellFloating { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
BackgroundColor
Gets or sets the color of the area below the last row and right of the last column inside the grid window.
Declaration
public Color BackgroundColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
BackgroundColorString
Gets or sets Background ColorString. Internal only.
Declaration
public string BackgroundColorString { get; set; }
Property Value
| Type |
|---|
| System.String |
BlackWhite
Gets or sets a value indicating whether the grid should print only in black and white.
Declaration
public bool BlackWhite { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Buttons3D
Gets or sets a value indicating whether row and column headers should appear raised or flat.
Declaration
public bool Buttons3D { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
CenterHorizontal
Gets or sets a value indicating whether the grid should be centered horizontally on the page when printing.
Declaration
public bool CenterHorizontal { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
CenterVertical
Gets or sets a value indicating whether the grid should be centered vertically on the page when printing.
Declaration
public bool CenterVertical { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ColHeaders
Gets or sets a value indicating whether the grid should be display column headers.
Declaration
public bool ColHeaders { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
DisplayHorzLines
Gets or sets a value indicating whether horizontal lines should be displayed.
Declaration
public bool DisplayHorzLines { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
DisplayVertLines
Gets or sets a value indicating whether vertical lines should be displayed.
Declaration
public bool DisplayVertLines { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
FixedLinesColor
Gets or sets the color of frozen grid lines.
Declaration
public Color FixedLinesColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
FixedLinesColorString
Gets or sets Fixed Lines ColorString. Internal only.
Declaration
public string FixedLinesColorString { get; set; }
Property Value
| Type |
|---|
| System.String |
ForceImmediateRepaint
Gets or sets immediate repaint of Client Area.
Declaration
public bool ForceImmediateRepaint { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
GridLineColor
Gets or sets the color of grid lines.
Declaration
public Color GridLineColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
GridLineColorString
Gets or sets GridLine Color String. Internal only
Declaration
public string GridLineColorString { get; set; }
Property Value
| Type |
|---|
| System.String |
MarkColHeader
Gets or sets a value indicating whether the column header for the current cell should be highlighted.
Declaration
public bool MarkColHeader { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
MarkRowHeader
Gets or sets a value indicating whether the row header for the current cell should be highlighted.
Declaration
public bool MarkRowHeader { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Modified
Gets a value indicating whether the dictionary was modified.
Declaration
public bool Modified { get; }
Property Value
| Type |
|---|
| System.Boolean |
PageOrder
Gets or sets the page order how the grid should be printed.
Declaration
public int PageOrder { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
PrintColHeader
Gets or sets a value indicating whether column headers should be printed when printing the grid.
Declaration
public bool PrintColHeader { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
PrintFrame
Gets or sets a value indicating whether a frame should be drawn around the grid when printing.
Declaration
public bool PrintFrame { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
PrintHorzLines
Gets or sets a value indicating whether the grid should draw horizontal lines when printing.
Declaration
public bool PrintHorzLines { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Printing
Gets or sets a value indicating whether switch to printing mode for the grid.
Declaration
public bool Printing { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
PrintRowHeader
Gets or sets a value indicating whether row headers should be printed when printing the grid.
Declaration
public bool PrintRowHeader { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
PrintVertLines
Gets or sets a value indicating whether the grid should draw vertical lines when printing.
Declaration
public bool PrintVertLines { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ResizingCellsLinesColor
Gets or sets the color of the grid line marker when the user is resizing rows or columns.
Declaration
public Color ResizingCellsLinesColor { get; set; }
Property Value
| Type |
|---|
| System.Drawing.Color |
ResizingCellsLinesColorString
Gets or sets ResizingCells Lines ColorString. Internal only.
Declaration
public string ResizingCellsLinesColorString { get; set; }
Property Value
| Type |
|---|
| System.String |
RowHeaders
Gets or sets a value indicating whether row headers should be displayed or hidden. (Might be better to use HideCols[0] = false) instead.
Declaration
public bool RowHeaders { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
ThemedHeader
Gets or sets a value indicating whether the grid should print the header with theme
Declaration
public bool ThemedHeader { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Methods
Clone()
Creates a deep copy of the GridProperties object
Declaration
public GridProperties Clone()
Returns
| Type | Description |
|---|---|
| GridProperties | A duplicate of the current object. |
Remarks
This will copy the values of the GridProperties object, ignoring the GridModel references.
GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the GridProperties.
Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | A SerializationInfo object containing the information required to serialize the object. |
| System.Runtime.Serialization.StreamingContext | context | A StreamingContext object containing the source and destination of the serialized stream. |
ResetBackgroundColor()
Resets BackgroundColor to its default value.
Declaration
public void ResetBackgroundColor()
ResetFixedLinesColor()
Resets FixedLinesColor to its default value.
Declaration
public void ResetFixedLinesColor()
ResetGridLineColor()
Resets GridLineColor to its default value.
Declaration
public void ResetGridLineColor()
ResetModified()
Resets the Modified flag.
Declaration
public void ResetModified()
ResetResizingCellsLinesColor()
Resets ResizingCellsLinesColor to its default value.
Declaration
public void ResetResizingCellsLinesColor()
Events
Changed
Occurs when any property in this object is changed.
Declaration
public event EventHandler Changed
Event Type
| Type |
|---|
| System.EventHandler |