Class CellElement
Serves as base class for different types of Cells.
Namespace: Syncfusion.SfDataGrid
Assembly: Syncfusion.SfDataGrid.Android.dll
Syntax
public class CellElement : ViewGroup
Constructors
CellElement(Context)
Initializes a new instance of the CellElement class.
Declaration
public CellElement(Context context)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | The Android.Content.Context. |
CellElement(Context, IAttributeSet)
Initializes a new instance of the CellElement class.
Declaration
public CellElement(Context context, IAttributeSet attributeSet)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | The Android.Content.Context. |
Android.Util.IAttributeSet | attributeSet | The Android.Util.IAttributeSet. |
CellElement(Context, IAttributeSet, Int32)
Initializes a new instance of the CellElement class.
Declaration
public CellElement(Context context, IAttributeSet attributeSet, int definedStyle)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | The Android.Content.Context. |
Android.Util.IAttributeSet | attributeSet | The Android.Util.IAttributeSet. |
System.Int32 | definedStyle | The value for defined style. |
CellElement(IntPtr, JniHandleOwnership)
Initializes a new instance of the CellElement class.
Declaration
protected CellElement(IntPtr javaReference, JniHandleOwnership transfer)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | javaReference | The System.IntPtr. |
Android.Runtime.JniHandleOwnership | transfer | The Android.Runtime.JniHandleOwnership. |
Properties
CanRendererUnload
Gets or sets a value indicating whether the View can be unloaded by Renderer.
Declaration
public bool CanRendererUnload { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the renderer can unload this view, otherwise false. The default is true. |
CanRenderUnLoad
Gets or sets a value indicating whether the View can be unloaded by Renderer.
Declaration
public bool CanRenderUnLoad { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the renderer can unload this view, otherwise false. The default is true. |
Methods
CalculateLeftAndRightPadding(GravityFlags, TextView, String, Int32, Thickness, out Int32, out Int32, LineBreakMode)
Calculates the left and right padding for the cell element.
Declaration
protected void CalculateLeftAndRightPadding(GravityFlags alignment, TextView view, string text, int actualWidth, Thickness columnPadding, out int leftPadding, out int rightPadding, LineBreakMode lineBreakMode)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.GravityFlags | alignment | The alignment of the grid column. |
Android.Widget.TextView | view | The view loaded inside the cell element. |
System.String | text | The text of the cell element. |
System.Int32 | actualWidth | The actual width of the cell element. |
Thickness | columnPadding | The padding for the cell element. |
System.Int32 | leftPadding | The left padding value for the cell element. |
System.Int32 | rightPadding | The right padding value for the cell element. |
LineBreakMode | lineBreakMode | The line break mode of the associated grid column. |
CalculateTopAndBottomPadding(GravityFlags, TextView, String, Int32, Thickness, out Int32, out Int32, Paint, LineBreakMode, Double)
Calculates the top and bottom padding for the cell element.
Declaration
protected void CalculateTopAndBottomPadding(GravityFlags alignment, TextView view, string text, int height, Thickness columnPadding, out int topPadding, out int bottomPadding, Paint paintText, LineBreakMode lineBreakMode, double actualWidth)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.GravityFlags | alignment | The alignment of the grid column. |
Android.Widget.TextView | view | The view loaded inside the cell element. |
System.String | text | The text of the cell element. |
System.Int32 | height | The height of the cell element. |
Thickness | columnPadding | The padding of the cell element. |
System.Int32 | topPadding | The top padding value for the cell element. |
System.Int32 | bottomPadding | The bottom padding value for the cell element. |
Android.Graphics.Paint | paintText | The paint for the cell element. |
LineBreakMode | lineBreakMode | The line break mode of the associated grid column. |
System.Double | actualWidth | the actual width |
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
GetAutoHeight(Object)
Override method that enables the user to set a desired row height value for UserCellType columns
Declaration
protected virtual double GetAutoHeight(object rowData)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | Row data |
Returns
Type | Description |
---|---|
System.Double | Returns the double value indicating whether to set a desired row height value for UserCellType columns. |
GetAutoWidth(Object)
Override method that enables the user to set a desired column width value for UserCellType columns
Declaration
protected virtual double GetAutoWidth(object rowData)
Parameters
Type | Name | Description |
---|---|---|
System.Object | rowData | Row data |
Returns
Type | Description |
---|---|
System.Double | Returns the double value indicating whether to set a desired column width value for UserCellType columns. |
GetHorizontalAlignment(GravityFlags, GravityFlags, Boolean)
Gets the Horizontal alignment of the cell element.
Declaration
protected GravityFlags GetHorizontalAlignment(GravityFlags originalAlignment, GravityFlags alignment, bool isRTL)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.GravityFlags | originalAlignment | The original alignment. |
Android.Views.GravityFlags | alignment | The horizontal alignment to be set. |
System.Boolean | isRTL |
Returns
Type | Description |
---|---|
Android.Views.GravityFlags | The horizontal alignment based on the original alignment. |
GetVerticalAlignment(GravityFlags, GravityFlags)
Gets the Vertical alignment of the cell element.
Declaration
protected GravityFlags GetVerticalAlignment(GravityFlags originalAlignment, GravityFlags alignment)
Parameters
Type | Name | Description |
---|---|---|
Android.Views.GravityFlags | originalAlignment | The original alignment. |
Android.Views.GravityFlags | alignment | The vertical alignment to be set. |
Returns
Type | Description |
---|---|
Android.Views.GravityFlags | The vertical alignment based on the original alignment. |
Load()
Called when the view is created
Declaration
protected virtual void Load()
OnCellValueChanged()
This method fires when the cell value is changed.
Declaration
public virtual void OnCellValueChanged()
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Positions and sizes the child views.
Declaration
protected override void OnLayout(bool changed, int l, int t, int r, int b)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | changed | A boolean value indicating whether it is a new size or position for this view. |
System.Int32 | l | A value that represents the x coordinate of the child. |
System.Int32 | t | A value that represents the y coordinate of the child. |
System.Int32 | r | A value that represents the width of the child. |
System.Int32 | b | A value that represents the height of the child. |
UnLoad()
Called when the view is disposed
Declaration
protected virtual void UnLoad()