ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1DisplayColumn.FetchStyle Property

Gets or sets a value indicating whether the FetchCellStyle event will be raised for a column.

[Visual Basic]

Public Property FetchStyle As Boolean

[C#]

public bool FetchStyle {get;set;}

[Delphi]

public property FetchStyle: Boolean read get_FetchStyle write set_FetchStyle;

Remarks

If True, the C1TrueDBGrid.FetchCellStyle event will be raised as needed to determine the font and color characteristics of each cell in the associated column.

If False (the default), the C1TrueDBGrid.FetchCellStyle event will not be raised.

Set this value to True when needing to perform complex per-cell formatting operations that can only be done using the C1TrueDBGrid.FetchCellStyle event. For example, when wanting to apply fonts and/or colors to cells within a certain range, or cells that satisfy a complex expression, then set FetchStyle to True for the desired column(s) and write code for the C1TrueDBGrid.FetchCellStyle event.

Note: To apply the same formatting to all cells within a row, then set the C1TrueDBGrid.FetchRowStyles property instead of FetchStyle, and write code for the C1TrueDBGrid.FetchRowStyle event instead of C1TrueDBGrid.FetchCellStyle. This is much more efficient because events are raised on a per-row rather than on a per-cell basis.

Example

For an example using the FetchStyle property, see Disabling Editing in a Specified TrueDBGrid Cell.

See Also

C1DisplayColumn Class | C1DisplayColumn Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.