Class DataGridCell
Represents a record cell in a SfDataGrid control.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridCell : DataGridCellBase, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IDisposable, ITapGestureListener, IDoubleTapGestureListener, ILongPressGestureListener, ITextElement, IRightTapGestureListener, IGestureListener, ITouchListener
Constructors
DataGridCell()
Initializes a new instance of the DataGridCell class.
Declaration
public DataGridCell()
Fields
BackgroundProperty
Identifies the Background Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty BackgroundProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
BorderColorProperty
Identifies the BorderColor Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty BorderColorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
CellValueProperty
Identifies the CellValue Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty CellValueProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This Microsoft.Maui.Controls.BindableProperty is read-only.
ErrorMessageProperty
Identifies the ErrorMessage Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty ErrorMessageProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
FontAttributesProperty
Identifies the FontAttributes Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
FontFamilyProperty
Identifies the FontFamily Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
FontSizeProperty
Identifies the FontSize Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
PaddingProperty
Identifes the CellPadding Microsoft.Maui.Controls.BindableProperty
Declaration
public static readonly BindableProperty PaddingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TextAlignmentProperty
Identifies the TextAlginment Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty TextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TextColorProperty
Identifies the TextColor Microsoft.Maui.Controls.BindableProperty.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
Background
Gets or sets the background.
Declaration
public Brush Background { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.Brush |
BorderColor
Gets or sets the border color of the DataGridCell.
Declaration
public Color BorderColor { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Graphics.Color |
CellValue
Gets the cell value of the DataGridCell.
Declaration
public object CellValue { get; }
Property Value
Type | Description |
---|---|
System.Object | An object that represents the cell value of the DataGridCell. |
ColumnIndex
Gets the column Index of the DataGridCell.
Declaration
public int ColumnIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | A value that determines the column Index of the DataGridCell. |
DataColumn
Gets the data column associated with the grid cell which contains the details of the column.
Declaration
public DataColumnBase DataColumn { get; }
Property Value
Type | Description |
---|---|
Syncfusion.Maui.DataGrid.DataColumnBase | An object that represents the DataGridColumn associated with the DataGridCell, which contains the details of the column. |
ErrorMessage
Gets or sets cell error message which is displayed in cell error indicator's ToolTip.
Declaration
public string ErrorMessage { get; set; }
Property Value
Type |
---|
System.String |
FontAttributes
Gets or sets the font attributes.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Controls.FontAttributes |
FontAutoScalingEnabled
Declaration
public bool FontAutoScalingEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
FontFamily
Gets or sets the font family.
Declaration
public string FontFamily { get; set; }
Property Value
Type |
---|
System.String |
FontSize
Gets or sets the size of font.
Declaration
public double FontSize { get; set; }
Property Value
Type |
---|
System.Double |
Padding
Gets or sets the inner padding of the cell.
Declaration
public Thickness Padding { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Thickness |
RowIndex
Gets the row Index of the DataGridCell.
Declaration
public int RowIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | A value that determines the row Index of the DataGridCell. |
TextAlignment
Gets or sets the TextAlignment.
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
Type |
---|
Microsoft.Maui.TextAlignment |
TextColor
Gets or sets the color of the text.
Declaration
public Color TextColor { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Graphics.Color |
Methods
ApplyValidationVisualState()
Applies the validation state and error message for invalid cells
Declaration
protected virtual void ApplyValidationVisualState()
Dispose()
Releases the resources used by the component.
Declaration
public void Dispose()
OnDraw(ICanvas, RectF)
Method to draw the cell
Declaration
protected override void OnDraw(ICanvas canvas, RectF dirtyRect)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Maui.Graphics.ICanvas | canvas | The canvas for draw |
Microsoft.Maui.Graphics.RectF | dirtyRect | Rectagle for draw |
Overrides
OnHandlerChanged()
Called when the handler is changed in DataGridCell
Declaration
protected override void OnHandlerChanged()