Gets or sets a value indicating whether cells in this column are drawn by the user in the OwnerDrawCell event.
[Visual Basic]
Public Property OwnerDraw As Boolean
[C#]
public bool OwnerDraw {get;set;}
[Delphi]
public property OwnerDraw: Boolean read get_OwnerDraw write set_OwnerDraw;
Remarks
If True, the C1TrueDBGrid.OwnerDrawCell event will be raised as needed to display the contents of each cell in the associated column.
If False (the default), the C1TrueDBGrid.OwnerDrawCell event will not be raised.
Set this value to True when you need to perform complex per-cell display operations that can only be done using the C1TrueDBGrid.OwnerDrawCell event. For example, to display a metafile within a cell, set OwnerDraw to True for the desired column and write code for the C1TrueDBGrid.OwnerDrawCell event.
Example
The following code sets the OwnerDraw property to True for the first column in the first split:
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).OwnerDraw = True
· C#
this.c1TrueDBGrid1.Splits[0].DisplayColumns[0].OwnerDraw = true;
· Delphi
Self.C1TrueDBGrid1.Splits[0].DisplayColumns[0].OwnerDraw := True;
For an example of using the OwnerDraw property with the C1TrueDBGrid.OwnerDrawCell event, see Owner-Drawn Cells.
See Also
C1DisplayColumn Class | C1DisplayColumn Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |